Image processing apparatus, image processing method, and program

ABSTRACT

There is provided an image processing apparatus including a first polarizing unit that has a first polarization region and a second polarization region to transmit different polarized light corresponding to different viewing point images, a second polarizing unit that includes a third polarization region to transmit only transmission light of the first polarization region, a fourth polarization region to transmit only transmission light of the second polarization region, and a total transmission region to transmit the total transmission light of the first polarization region and the second polarization region, an imaging element, and an image processing unit that executes signal processing with respect to an output signal of the imaging element. The image processing unit executes correction processing to generate a two-dimensional image and executes image conversion of the two-dimensional image to generate a left eye image and a right eye image for three-dimensional image display.

RELATED APPLICATIONS

This Application claims the benefit under 35 U.S.C. §120 of U.S.application Ser. No. 13/538,139, entitled “IMAGE PROCESSING APPARATUS,IMAGE PROCESSING METHOD, AND PROGRAM” filed on Jun. 29, 2012, which isherein incorporated by reference in its entirety. Foreign prioritybenefits are claimed under 35 U.S.C. §119(a)-(d) or 35 U.S.C. §365(b) ofJapanese application number 2011-152885, filed Jul. 11, 2011.

BACKGROUND

The present disclosure relates to an image processing apparatus, animage processing method, and a program. More specifically, the presentdisclosure relates to an image processing apparatus, an image processingmethod, and a program that execute processing for generating athree-dimensional image (3D image) to be stereoscopically viewed(three-dimensionally viewed).

A stereoscopic image (three-dimensional image) that can be viewed as athree-dimensional image having depth is configured of a combination oftwo images of an image for a left eye and an image for a right eye,which are images from different viewing points. In order to obtain theimages from the two viewing points, that is, binocular parallax images,two imaging apparatuses are arranged at left and right sides to be apartfrom each other and capture images.

A pair of captured stereoscopic images are configured using a pair ofimages including an image for a left eye to be captured by the leftimaging apparatus and observed by the left eye and an image for a righteye to be captured by the right imaging apparatus and observed by theright eye.

The pair of stereoscopic images that are configured using the pair ofimages including the image for the left eye and the image for the righteye are displayed on a display apparatus that can separate the image forthe left eye and the image for the right eye to be viewed by the lefteye and the right eye of an observer, such that the observer canrecognize the images as a three-dimensional image.

However, when the images from the two viewing points are photographedusing the two cameras, precise synchronization control of the twocameras should be performed, the synchronization control is verydifficult, and accurate control of a convergence angle is verydifficult.

A three-dimensional photographing apparatus in which polarizationfilters polarized to become orthogonal in relation are combined tofacilitate adjustment of a lens system to perform three-dimensionalphotographing and an optical system is shared is disclosed in JapanesePatent Application Publication No. 6-054991.

A method of performing three-dimensional photographing by an imagingapparatus including two lenses and one imaging unit is disclosed inJapanese Patent Application Publication No. 2004-309868. The imagingapparatus that is disclosed in Japanese Patent Application PublicationNo. 2004-309868 sets (a) a combination configuration of a lens and ahorizontal component polarization filter and (b) a combinationconfiguration of a lens and a vertical component polarization filterarranged to be apart from each other by an interval according to humanparallax to positions apart from an imaging surface of a CCD by apredetermined distance and acquires an image for a left eye and an imagefor a right eye using the two combination configurations of (a) and (b).

SUMMARY

According to technology that is disclosed in Japanese Patent ApplicationPublication No. 6-054991, the lens system is shared by overlappingoutputs of the two polarization filters and forming a single opticalpath.

However, a polarization filter should be further provided to extract theimage for the left eye and the image for the right eye in the followingstep, the optical path should be divided again, and light should beincident on each polarization filter. For this reason, light loss isgenerated in the lens system and it is difficult to decrease a size ofthe apparatus.

According to technology that is disclosed in Japanese Patent ApplicationLaid-Open No. 2004-309868, because the two sets of lenses andpolarization filters should be provided, the apparatus becomes complexand a size of the apparatus increases.

The present disclosure has been made in view of the above circumstancesand provides an image processing apparatus, an image processing method,and a program that execute processing with respect to an imagephotographed by one imaging apparatus and generate an image observed asa three-dimensional image.

The present disclosure provides an image processing apparatus, an imageprocessing method, and a program that execute interpolation processingof a two-dimensional image used for generating an image to be applied tothree-dimensional image display.

According to a first embodiment of the present disclosure, there isprovided an image processing apparatus which includes a first polarizingunit that has a first polarization region and a second polarizationregion to transmit different polarized light corresponding to differentviewing point images, a second polarizing unit that causes transmissionlight of the first polarizing unit to be incident and includes a thirdpolarization region to transmit only the transmission light of the firstpolarization region, a fourth polarization region to transmit onlytransmission light of the second polarization region, and a totaltransmission region to transmit the transmission light of the firstpolarization region and the second polarization region, an imagingelement that receives the transmission light of the second polarizingunit, and an image processing unit that executes signal processing withrespect to an output signal of the imaging element. The image processingunit includes a parallax detecting unit that applies two differentviewing point images of an image based on the transmission light of thethird polarization region of the second polarizing unit and an imagebased on the transmission light of the fourth polarization region of thesecond polarizing unit and generates parallax information in which anobject distance is reflected, an image correcting unit that executescorrection processing with respect to an input image from the imagingelement and generates a two-dimensional image, and a parallax imagegenerating unit that applies the parallax information generated by theparallax detecting unit, executes image conversion processing of thetwo-dimensional image generated by the image correcting unit, andgenerates a left eye image and a right eye image for three-dimensionalimage display.

In the image processing apparatus according to the embodiment of thepresent disclosure, the image correcting unit includes a brightnesscorrecting unit that executes brightness correction to match brightnessof polarization region pixels (PL pixels) and polarization region pixeladjacent pixels (PL pixel adjacent pixels), which are pixelscorresponding to the third polarization region and the fourthpolarization region of the second polarizing unit, with brightness oftotal transmission region pixels (N pixels) corresponding to the totaltransmission region, a reflection detecting unit that generatesreflection information, which is determination information on whether areflection light component is included in each pixel value, in units ofpolarization region pixels (PL pixels), a gradient detecting unit thatgenerates gradient information corresponding to pixel value change ratesof a plurality of directions of peripheral pixels in units ofpolarization region pixels (PL pixels), and an interpolation processingunit that selects reference pixels according to the reflectioninformation and the gradient information, applies pixel values of theselected reference pixels, and executes pixel value interpolationprocessing of the polarization region pixels (PL pixels).

In the image processing apparatus according to the embodiment of thepresent disclosure, the interpolation processing unit determines adirection having a high correlation where a gradient is small on thebasis of gradient information of non-polarization region pixels (Npixels) becoming interpolation processing objects, and executesinterpolation processing using pixels in the direction having the highcorrelation as the reference pixels.

In the image processing apparatus according to the embodiment of thepresent disclosure, the interpolation processing unit determines adirection having a high correlation where a gradient is small on thebasis of gradient information of non-polarization region pixels (Npixels) becoming interpolation processing objects, and executesinterpolation processing using the non-polarization region pixels (Npixels) in the direction having the high correlation as the referencepixels.

In the image processing apparatus according to the embodiment of thepresent disclosure, when reflection information of the polarizationregion pixels (PL pixels) becoming interpolation processing objectsshows that there is reflection, the interpolation processing unitselects non-polarization region pixels (N pixels) in a direction havinga high correlation as the reference pixels on the basis of the gradientinformation, and executes interpolation processing to which the selectedreference pixels are applied.

In the image processing apparatus according to the embodiment of thepresent disclosure, when reflection information of the polarizationregion pixels (PL pixels) becoming interpolation processing objectsshows that there is no reflection, the interpolation processing unitselects non-polarization region pixels (N pixels) in a direction havinga high correlation or the polarization region pixels (PL pixels) as thereference pixels on the basis of the gradient information, and executesinterpolation processing to which the selected reference pixels areapplied.

In the image processing apparatus according to the embodiment of thepresent disclosure, in interpolation processing with respect to aphotographed image of a 2D mode photographed in a state in which thefirst polarizing unit is removed from an optical path, the interpolationprocessing unit outputs a pixel value in which the brightness iscorrected by the brightness correcting unit, without executing theinterpolation processing of the polarization region pixels (PL pixels),when reflection information of the polarization region pixels (PLpixels) becoming interpolation processing objects shows that there is noreflection.

In the image processing apparatus according to the embodiment of thepresent disclosure, the brightness correcting unit calculates gainscorresponding to brightness ratios with the total transmission regionpixels (N pixels) around the polarization region pixels (PL pixels) andthe polarization region pixel adjacent pixels (PL pixel adjacent pixels)becoming brightness correction objects, multiplies the brightnesscorrection object pixels with the calculated gains, and executesbrightness correction.

In the image processing apparatus according to the embodiment of thepresent disclosure, the reflection detecting unit detects the differenceof a pixel value of an imaging element corresponding to a position ofthe third polarization region of the second polarizing unit and a pixelvalue of an imaging element corresponding to a position of the fourthpolarization region of the second polarizing unit and generatesreflection information, which is determination information on whether areflection light component is included in a pixel value of thepolarization region pixel (PL pixel), on the basis of the difference.

In the image processing apparatus according to the embodiment of thepresent disclosure, the image correcting unit sets an index showing apixel attribute in units of pixels forming an output image from theimaging element and determines processing according to the index.

In the image processing apparatus according to the embodiment of thepresent disclosure, the index includes a coordinate attribute showing apixel position, a viewing point attribute showing a viewing pointposition, and a color attribute showing a pixel color.

According to a second embodiment of the present disclosure, there isprovided an image processing method that is executed in an imageprocessing apparatus including a first polarizing unit that has a firstpolarization region and a second polarization region to transmitdifferent polarized light corresponding to different viewing pointimages, a second polarizing unit that causes transmission light of thefirst polarizing unit to be incident and includes a third polarizationregion to transmit only the transmission light of the first polarizationregion, a fourth polarization region to transmit only transmission lightof the second polarization region, and a total transmission region totransmit the transmission light of the first polarization region and thesecond polarization region, an imaging element that receives thetransmission light of the second polarizing unit, and an imageprocessing unit that executes signal processing with respect to anoutput signal of the imaging element, wherein the image processing unitexecutes parallax detection processing for applying two differentviewing point images of an image based on the transmission light of thethird polarization region of the second polarizing unit and an imagebased on the transmission light of the fourth polarization region of thesecond polarizing unit and generating parallax information in which anobject distance is reflected, image correction processing for executingcorrection processing with respect to an input image from the imagingelement and generating a two-dimensional image, and parallax imagegeneration processing for applying the parallax information generated bythe parallax detection processing, executing image conversion processingof the two-dimensional image generated by the image correctionprocessing, and generating a left eye image and a right eye image forthree-dimensional image display.

According to a third embodiment of the present disclosure, there isprovided a program for causing an image processing apparatus to executeimage processing, the image processing apparatus including a firstpolarizing unit that has a first polarization region and a secondpolarization region to transmit different polarized light correspondingto different viewing point images, a second polarizing unit that causestransmission light of the first polarizing unit to be incident andincludes a third polarization region to transmit only the transmissionlight of the first polarization region, a fourth polarization region totransmit only transmission light of the second polarization region, anda total transmission region to transmit the transmission light of thefirst polarization region and the second polarization region, an imagingelement that receives the transmission light of the second polarizingunit, and an image processing unit that executes signal processing withrespect to an output signal of the imaging element, wherein the programcauses the image processing unit to execute parallax detectionprocessing for applying two different viewing point images of an imagebased on the transmission light of the third polarization region of thesecond polarizing unit and an image based on the transmission light ofthe fourth polarization region of the second polarizing unit andgenerating parallax information in which an object distance isreflected, image correction processing for executing correctionprocessing with respect to an input image from the imaging element andgenerating a two-dimensional image, and parallax image generationprocessing for applying the parallax information generated by theparallax detection processing, executing image conversion processing ofthe two-dimensional image generated by the image correction processing,and generating a left eye image and a right eye image forthree-dimensional image display.

The program according to the present disclosure is recorded in arecording medium and is provided to an information processing apparatusor a computer system that can execute various program codes. Byexecuting the program by a program executing unit on the informationprocessing apparatus or the computer system, processing according to theprogram is realized.

Other objects, features, and advantages of the present disclosure willbe more apparent from the following description taken in conjunctionwith the embodiments and the accompanying drawings. In the presentdisclosure, a system has a logical set configuration of a plurality ofapparatuses and each apparatus may not be provided in the same casing.

According to the embodiments of the present disclosure described above,a configuration that executes interpolation processing of atwo-dimensional image used for generating an image to be applied tothree-dimensional image display is provided.

For example, an image processing apparatus according to the presentdisclosure includes a first polarizing unit that has a firstpolarization region and a second polarization region to transmitdifferent polarized light corresponding to different viewing pointimages, a second polarizing unit that includes a third polarizationregion to transmit only transmission light of the first polarizationregion, a fourth polarization region to transmit only transmission lightof the second polarization region, and a total transmission region totransmit the total transmission light of the first polarization regionand the second polarization region, an imaging element, and an imageprocessing unit that executes signal processing with respect to anoutput signal of the imaging element. In this configuration, the imageprocessing unit executes correction processing to which presence orabsence of reflection light or gradient information is applied, withrespect to an input image from the imaging element, and generates atwo-dimensional image. The image processing unit applies parallaxinformation generated on the basis of each transmission light of thethird polarization region and the fourth polarization region, executesimage conversion of the two-dimensional image, and generates a left eyeimage and a right eye image for three-dimensional image display.

By this configuration, a two-dimensional image that has a small errorcan be generated by interpolation processing based on the reflectionlight or the gradient information and a left eye image and a right eyeimage for high-definition three-dimensional image display can begenerated by 2D3D conversion processing based on the two-dimensionalimage having high quality.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a diagram illustrating an entire configuration of an imageprocessing apparatus according to the present disclosure;

FIG. 1B is a diagram illustrating details of the first polarizing unitshown in FIG. 1A;

FIG. 1C is a diagram illustrating details of the second polarizing unitshown in FIG. 1A;

FIG. 2 is a diagram illustrating a configuration example of a secondpolarizing unit and an imaging element;

FIG. 3 is a diagram illustrating a configuration example of the secondpolarizing unit;

FIG. 4 is a diagram illustrating a configuration example of the secondpolarizing unit and the imaging element;

FIG. 5 is a diagram illustrating a configuration example of an imageprocessing unit of the image processing apparatus according to thepresent disclosure;

FIG. 6 is a diagram illustrating a processing example of a polarizationpixel interpolation processing unit;

FIG. 7A is a diagram illustrating a switching configuration of a 3D modein an imaging apparatus;

FIG. 7B is a diagram illustrating a switching configuration of a 2D modein an imaging apparatus;

FIG. 8 is a diagram illustrating a configuration example of the imageprocessing unit of the image processing apparatus according to thepresent disclosure;

FIG. 9 is a diagram illustrating a configuration example of an imagecorrecting unit of the image processing unit of the image processingapparatus according to the present disclosure;

FIG. 10 is a flowchart illustrating an example of a sequence ofprocessing that is executed by the image correcting unit;

FIG. 11 is a diagram illustrating an example of an input image (Rawimage) of an image correcting unit 100 and a setting example of an indexto determine an attribute of each pixel of an image;

FIG. 12 is a diagram illustrating a configuration of an index showing apixel attribute;

FIG. 13 is a diagram illustrating a setting example of each index of anX-coordinate attribute (X index) [xidx (x)] and a Y-coordinate attribute(Y index) [yidx (y)];

FIG. 14 is a diagram illustrating a specific example of brightnesscorrection processing that is executed by a brightness correcting unit;

FIG. 15 is a diagram illustrating a specific example of gradientdetection processing that is executed by a gradient detecting unit;

FIG. 16 is a diagram illustrating a specific example of reflectiondetection processing that is executed by a reflection detecting unit;

FIG. 17 is a diagram illustrating a specific example of reflectiondetection processing that is executed by the reflection detecting unit;

FIG. 18 is a diagram illustrating a specific example of reflectiondetection processing that is executed by the reflection detecting unit;

FIG. 19 is a diagram illustrating a specific example of reflectiondetection processing that is executed by the reflection detecting unit;

FIG. 20 is a diagram illustrating a specific example of reflectiondetection processing that is executed by the reflection detecting unit;

FIG. 21 is a flowchart illustrating a specific example of interpolationprocessing that is executed by an interpolation processing unit;

FIG. 22 is a flowchart illustrating a specific example of interpolationprocessing that is executed by the interpolation processing unit;

FIG. 23 is a flowchart illustrating an example of a sequence ofprocessing that is executed by the image correcting unit;

FIG. 24 is a flowchart illustrating a specific example of interpolationprocessing that is executed by the interpolation processing unit;

FIG. 25 is a flowchart illustrating a specific example of interpolationprocessing that is executed by the interpolation processing unit;

FIG. 26 is a flowchart illustrating a specific example of interpolationprocessing that is executed by the interpolation processing unit;

FIG. 27 is a flowchart illustrating a specific example of interpolationprocessing that is executed by the interpolation processing unit;

FIG. 28 is a flowchart illustrating an example of a sequence ofprocessing that is executed by the image correcting unit;

FIG. 29 is a flowchart illustrating a specific example of brightnesscorrection processing that is executed by the brightness correctingunit;

FIG. 30 is a diagram illustrating a specific example of brightnesscorrection processing that is executed by the brightness correctingunit;

FIG. 31 is a diagram illustrating an example of an input image (Rawimage) of the image correcting unit 100 and a setting example of anindex to determine an attribute of each pixel of an image; and

FIG. 32 is a diagram illustrating a configuration of an index showing apixel attribute.

DETAILED DESCRIPTION OF THE EMBODIMENT(S)

Hereinafter, an image processing apparatus, an image processing method,and a program of the present disclosure will be described in detail withreference to the appended drawings. The following description will bemade in the order described below.

-   1. Basic Configuration and Processing Example of Image Processing    Apparatus according to Present Disclosure-   2. Specific Processing Example of Interpolation Processing

2-(1). Interpolation Processing Example with respect to ImagePhotographed in 2D Image Photographing Mode

2-(2). Interpolation Processing Example 1 with respect to ImagePhotographed in 3D Image Photographing Mode

2-(3). Interpolation Processing Example 2 with respect to ImagePhotographed in 3D Image Photographing Mode

2-(4). Interpolation Processing Example 3 with respect to ImagePhotographed in 3D Image Photographing Mode

-   3. Summary of Configuration according to Present Disclosure    [1. Basic Configuration and Processing Example of Image Processing    Apparatus according to Present Disclosure]

First, a basic configuration and a processing example of an imageprocessing apparatus according to the present disclosure will bedescribed.

FIGS. 1A to 1C illustrate a configuration of an imaging apparatus thatis an example of an image processing apparatus.

Incident light that corresponds to a photographing object is inputthrough a photographing lens 11 of an imaging apparatus 10 illustratedin FIG. 1A.

The incident light that is input through the photographing lens 11 isinput to an imaging element 16 through a first polarizing unit 12, adiaphragm 13, an image forming lens 14, and a second polarizing unit 15.

FIG. 1A is a diagram of the imaging apparatus (camera) 10 viewed fromthe upper side, that is, a top view. As illustrated in a schematicdiagram of the imaging apparatus 10 and a photographer 20, along withXYZ coordinate axes, at the lower left of FIG. 1A, a configurationdiagram of the imaging apparatus of FIG. 1A is a diagram of the imagingapparatus (camera) 10 viewed from the upper side.

As illustrated by a vertical dotted line (X axis) near the center ofFIG. 1A, the upper side of FIG. 1A becomes a right (R) side from thephotographer and the lower side of FIG. 1A becomes a left (L) side fromthe photographer.

The imaging element 16 is a photoelectric conversion element such as aCCD and a CMOS and generates an electrical signal according to objectlight and outputs the electrical signal to an image processing unit 17.

The image processing unit 17 executes signal processing according to apredetermined algorithm and stores image data as the processing resultin a storage unit 18.

The configuration and the processing of the image processing unit 17will be described in detail below.

In the configuration illustrated in FIG. 1A, the first polarizing unit12 has a configuration illustrated in FIG. 1B and the second polarizingunit 15 has a configuration illustrated in FIG. 1C.

The first polarizing unit 12 is divided into two portions of left andright portions, as illustrated in FIG. 1B. In the first polarizing unit12, different polarization regions of a vertical polarization region 12Vformed in a region of the left half and a horizontal polarization region12H formed in a region of the right half are configured. Thepolarization regions are configured using polarization filters.

The vertical polarization region 12V passes only polarized light of avertical direction and light that has passed through the verticalpolarization region 12V becomes the polarized light of the verticaldirection.

The horizontal polarization region 12H passes only polarized light of ahorizontal direction and light that has passed through the horizontalpolarization region 12H becomes the polarized light of the horizontaldirection.

A center of gravity point 31 illustrated in FIG. 1B is a position of acenter of gravity of the vertical polarization region 12V. Transmissionlight of the vertical polarization region 12V corresponds to an imageobserved using the center of gravity point 31 as a viewing point.

Likewise, a center of gravity point 32 illustrated in FIG. 1B is aposition of a center of gravity of the horizontal polarization region12H. Transmission light of the horizontal polarization region 12Hcorresponds to an image observed using the center of gravity point 32 asthe viewing point.

That is, an image that is observed using the center of gravity point 31,which is the position of the center of gravity of the verticalpolarization region 12V, as the viewing point corresponds to a left eyeviewing point image (L image) that is an observation image from the lefteye and an image that is observed using the center of gravity point 32,which is the position of the center of gravity of the horizontalpolarization region 12H, as the viewing point corresponds to a right eyeviewing point image (R image) that is an observation image from theright eye.

As such, an image that transmits the first polarizing unit 12 becomes animage that is obtained by transmitting two different left and rightviewing point images as vertically polarized light and horizontallypolarized light, respectively.

Light of the two different viewing point images, that is, the L image(vertically polarized light) corresponding to the image for the left eyeand the R image (horizontally polarized light) corresponding to theimage for the right eye, reaches the second polarizing unit 15 throughthe image forming lens 14.

In the following description, the “image for the right eye” is simplyreferred to as the “right eye image” and the “image for the left eye” issimply referred to as the “left eye image”.

The second polarizing unit 15 has the configuration illustrated in FIG.1C.

As illustrated in FIG. 1C, the second polarizing unit 15 has aconfiguration in which three kinds of regions including the horizontalpolarization region 15H, the vertical polarization region 15V, and atotal transmission (non-polarization) region 15A are repetitively setsequentially from the upper side.

The horizontal polarization region 15H selectively transmits thepolarized light of the horizontal direction to cause the imaging element16 to image only the horizontally polarized light.

The vertical polarization region 15V selectively transmits the polarizedlight of the vertical direction to cause the imaging element 16 to imageonly the vertically polarized light.

The total transmission (non-polarization) region 15A transmits both thepolarized light of the horizontal direction and the polarized light ofthe vertical direction to cause the imaging element 16 to image incidentlight thereof.

Each polarization region that is set to the second polarizing unit 15 isconfigured using a wire grid polarizer. Each polarization region is apolarizing element that has a configuration in which minute wires (forexample, aluminum (Al) lines) are arranged at a small interval andachieves a polarization characteristic according to a wire arrangementdirection.

FIG. 2 illustrates a state in which the second polarizing unit 15 andthe imaging element 16 receiving the transmission light of the secondpolarizing unit 15 overlap.

The imaging element 16 is an imaging element that has an RGB arrangement(Bayer arrangement).

A configuration example illustrated in FIG. 2 is an example in which thevertical polarization region 15V and the horizontal polarization region15H set to the second polarizing unit 15 are set to be adjacent in aunit of two lines of the imaging element and the total transmission(non-polarization) region 15A is set in a unit of twelve lines. That is,three kinds of regions of (a) the vertical polarization region 15V ofthe two lines, (b) the horizontal polarization region 15H of the twolines, and (c) the total transmission (non-polarization) region 15V ofthe twelve lines are repetitively set in a vertical direction (Ydirection) of the imaging element 16.

The horizontal polarization region 15H selectively transmits thepolarized light of the horizontal direction, that is, only the R image(horizontally polarized light) corresponding to the right eye imagetransmitted through the horizontal polarization region 12H illustratedin FIG. 1B, and causes the imaging element 16 to image the right eyeimage (R image).

The vertical polarization region 15V selectively transmits the polarizedlight of the vertical direction, that is, only the L image (verticallypolarized light) corresponding to the left eye image transmitted throughthe vertical polarization region 12V illustrated in FIG. 1B, and causesthe imaging element 16 to image the left eye image (L image).

The total transmission (non-polarization) region 15A transmits both theR image (horizontally polarized light) corresponding to the right eyeimage transmitted through the horizontal polarization region 12Hillustrated in FIG. 1B and the L image (vertically polarized light)corresponding to the left eye image transmitted through the verticalpolarization region 12V illustrated in FIG. 1B. The images become imagesthat correspond to images viewed from a center point 33, which is acenter position of the center of gravity point 31 and the center ofgravity point 32 illustrated in FIG. 1B. That is, the images become thesame images as normal images photographed by a normal monocular camerathat do not have a deviation in the viewing point due to thepolarization.

The configuration example illustrated in FIG. 2 is a configurationexample of the second polarizing unit 15 and is an example in which thevertical polarization region 15V and the horizontal polarization region15H are set to be adjacent in a unit of the two lines of the imagingelement and the total transmission (non-polarization) region 15A is setin a unit of the twelve lines.

As the configuration of the second polarizing unit 15, otherconfigurations can be used.

For example, as illustrated in FIG. 3, the vertical polarization region15V and the horizontal polarization region 15H can be set to rectangularregions and can be arranged alternately.

FIG. 4 is a diagram illustrating a state in which the second polarizingunit and the imaging element 16 having the RGB arrangement illustratedin FIG. 3 overlap.

An example illustrated in FIG. 4 is a configuration in which regions oftwo rows where the vertical polarization region 15V and the horizontalpolarization region 15H are set are alternately arranged in units ofrectangular regions including four pixels of 2×2 and the totaltransmission (non-polarization) regions 15A of fourteen rows arerepetitively arranged in the vertical direction (Y direction).

In this configuration, the horizontal polarization region 15H that isconfigured using the rectangular region including the four pixels of 2×2selectively transmits only the polarized light of the horizontaldirection, that is, the R image (horizontally polarized light)corresponding to the right eye image transmitted through the horizontalpolarization region 12H illustrated in FIG. 1B, and causes the imagingelement 16 to image the right eye image (R image).

The vertical polarization region 15V that is configured using therectangular region including the four pixels of 2×2 selectivelytransmits only the polarized light of the vertical direction, that is,the L image (vertically polarized light) corresponding to the left eyeimage transmitted through the vertical polarization region 12Villustrated in FIG. 1B, and causes the imaging element 16 to image theleft eye image (L image).

The total transmission (non-polarization) region 15A transmits both theR image (horizontally polarized light) corresponding to the right eyeimage transmitted through the horizontal polarization region 12Hillustrated in FIG. 1B and the L image (vertically polarized light)corresponding to the left eye image transmitted through the verticalpolarization region 12V illustrated in FIG. 1B. The images become imagesthat correspond to images viewed from the center point 33, which is thecenter position of the center of gravity point 31 and the center ofgravity point 32 illustrated in FIG. 1B. That is, the images become thesame images as normal images observed from the center point 33 that donot have a deviation in the viewing point due to the polarization.

FIG. 5 is a diagram illustrating a detailed configuration of the imageprocessing unit 17 illustrated in FIG. 1A.

The imaging element 16 is divided into the three kinds of regions of (a)the vertical polarization region, (b) the horizontal polarizationregion, and (c) the total transmission (non-polarization) region andinputs a signal corresponding to each region to the image processingunit 17, as described with reference to FIGS. 2 to 4.

In the following description, the pixels corresponding to (a) thevertical polarization regions and (b) the horizontal polarizationregions in the imaging element 16 are referred to as polarization (PL)pixels.

The pixels corresponding to the total polarization (non-polarization)regions are referred to as non-polarization (N) pixels.

An output of the imaging element 16 includes a PL pixel output (=outputof the pixels corresponding to the vertical polarization region and thehorizontal polarization region) and an N pixel output (=output of thepixels corresponding to the total transmission (non-polarization)region).

In this case, a processing example when the PL pixel output and the Npixel output are output from the imaging element 16 having thecombination configuration of the second polarizing unit 15 and theimaging element 16 described with reference to FIGS. 3 and 4 to theimage processing unit 17 will be described.

That is, the imaging element 16 has a configuration in which regions oftwo rows where the vertical polarization region 15V and the horizontalpolarization region 15H are alternately arranged in units of rectangularregions including four pixels of 2×2 and the total transmission(non-polarization) regions 15A of fourteen rows are repetitivelyarranged in the vertical direction (Y direction), as described withreference to FIG. 4.

Separation processing of the pixel output of each region of thepolarization region pixel (PL pixel) and the non-polarization regionpixel (N pixel) is executed with respect to the pixel signal that isoutput from the imaging element 16 illustrated in FIG. 5, in apolarization pixel separating unit 51 of the image processing unit 17.

An N pixel signal (non-polarization pixel signal) 61 that is separatedby the separation processing of the polarization pixel separating unit51 is input to the image correcting unit 52.

The image correcting unit 52 executes pixel interpolation processingwith respect to a pixel region missed from the N pixel signal(non-polarization pixel signal) 61, that is, the pixels of the PL pixelregion. Specifically, the image correcting unit 52 executesinterpolation processing for calculating a pixel value of the PL pixelregion with reference to pixel values of the upper and lower N pixelsand setting the pixel value.

An interpolation image (2D-Raw image) 62 that has the same pixel numberas the input image is generated by setting the pixel values of all ofthe PL pixel regions of which the pixel values are missing, by the pixelinterpolation processing. The interpolation image (2D-Raw image) 62 isan image in which a pixel value of any one of RGB is set to each pixel.

The interpolation image (2D-Raw image) 62 that is generated by the imagecorrecting unit 52 becomes an image in which N pixel signals(non-polarization pixel signals) are set to all of the pixels formingthe imaging element 16. The image is one two-dimensional (2D) Raw imagethat corresponds to an image observed from the center point 33 of thefirst polarizing unit 12 illustrated in FIG. 1B.

The interpolation image (2D-Raw image) 62 that is generated by the imagecorrecting unit 52 is input to a demosaicking processing unit 53.

The demosaicking processing unit 53 executes demosaicking processing andother camera signal processing with respect to the interpolation image(2D-Raw image) 62 and converts the interpolation image into a normal 2Dimage.

The demosaicking processing is processing for setting all color signals,for example, pixel values of individual colors of RGB, to all pixelpositions and is processing executed in a general camera.

The 2D-RGB image 63 that is generated by the demosaicking processingunit 53 is input to a parallax image generating unit 56.

Meanwhile, the PL pixel signal (polarization pixel signal) 65 that isone separation signal to be generated by the separation processing ofthe polarization pixel separating unit 51 becomes a pixel signal havingonly a pixel value of the polarization region pixel (PL pixel), ratherthan the pixel value of the non-polarization region pixel (N pixel).

The PL pixel signal (polarization pixel signal) 65 is input to thepolarization pixel interpolation processing unit 54.

The processing example described above is a configuration in which theregions of the two rows where the vertical polarization region 15V andthe horizontal polarization region 15H are alternately arranged in unitsof rectangular regions including the four pixels of 2×2 and the totaltransmission (non-polarization) regions 15A of the fourteen rows arerepetitively arranged in the vertical direction (Y direction), asdescribed with reference to FIG. 4.

Therefore, the PL pixel signal (polarization pixel signal) 65 that isgenerated by the separation processing of the polarization pixelseparating unit 51 becomes an image in which the regions of the two rowswhere the vertical polarization region 15V and the horizontalpolarization region 15H are alternately arranged in units of rectangularregions including the four pixels of 2×2 are set in the verticaldirection, for every 14 rows.

The polarization pixel interpolation processing unit 54 selects only theregions of the two rows where the vertical polarization region 15V andthe horizontal polarization region 15H are alternately arranged in unitsof rectangular regions including the four pixels of 2×2 as processingobjects and executes processing illustrated in FIG. 6 with respect tothe PL pixel regions.

That is, the polarization pixel interpolation processing unit 54generates each image of a left eye image signal (vertical polarizationimage signal) 66 a to which the pixel value corresponding to thevertical polarization region 15V is set and a right eye image signal(horizontal polarization image signal) 66 b to which the pixel valuecorresponding to the horizontal polarization region 15H is set, withrespect to the PL pixel region included in the PL pixel signal(polarization pixel signal) 65.

The left eye image signal (vertical polarization image signal) 66 aillustrated in FIG. 6 is generated by pixel value interpolationprocessing for resetting (removing) a pixel value of the horizontalpolarization pixel region of the PL pixel region included in the PLpixel signal (polarization pixel signal) 65 and setting the pixel valueof the reset pixel using the pixel values of the peripheral verticalpolarization pixels.

Likewise, the right eye image signal (horizontal polarization imagesignal) 66 b illustrated in FIG. 6 is generated by pixel valueinterpolation processing for resetting (removing) a pixel value of thehorizontal polarization pixel region of the PL pixel region included inthe PL pixel signal (polarization pixel signal) 65 and setting the pixelvalue of the reset pixel using the pixel values of the peripheralhorizontal polarization pixels.

As a result, the image to which the pixel value included in the left eyeimage signal (vertical polarization image signal) 66 a is set becomes animage viewed from the left center of gravity point 31 of the firstpolarizing unit 12 illustrated in FIG. 1B, that is, an imagecorresponding to the left eye image.

Likewise, the image to which the pixel value included in the right eyeimage signal (horizontal polarization image signal) 66 b is set becomesan image viewed from the right center of gravity point 32 of the firstpolarizing unit 12 illustrated in FIG. 1B, that is, an imagecorresponding to the right eye image.

As such, the polarization pixel interpolation processing unit 54interpolates information missing in a horizontal direction of each ofthe left eye image and the right eye image with respect to the PL pixelregion included in the PL pixel signal (polarization pixel signal) 65and generates the left eye image signal (vertical polarization imagesignal) 66 a and the right eye image signal (horizontal polarizationimage signal) 66 b that have the same horizontal pixel number as theinput image.

The image that is generated by the polarization pixel interpolationprocessing unit 54 is input to the parallax detecting unit 55.

The parallax detecting unit 55 compares corresponding pixels using blockmatching processing with respect to the two images of the left eye imagesignal (vertical polarization image signal) 66 a and the right eye imagesignal (horizontal polarization image signal) 66 b having the samehorizontal pixel number as the input image and illustrated in FIG. 6,calculates an object deviation amount, and detects the object distanceas parallax information.

That is, the parallax detecting unit 55 detects the deviation betweenthe pixels of the left eye image and the right eye image by the blockmatching processing and calculates the object distance according to thedeviation amount.

The parallax detecting unit 55 generates a depth map 67 having theobject distance information corresponding to each pixel and outputs thedepth map.

The depth map 67 is data that has the object distance information withrespect to each of the pixels forming the image. For example, the depthmap 67 is configured as an image to which a brightness value accordingto the object distance is set.

Specifically, a region having the short object distance (close to thecamera) has high brightness and a region having the long object distance(far from the camera) has low brightness. The parallax detecting unit 55generates the depth map to which the pixel value is set and outputs thedepth map to the parallax image generating unit 56.

The images of the left eye image signal (vertical polarization imagesignal) 66 a and the right eye image signal (horizontal polarizationimage signal) 66 b that are generated by the polarization pixelinterpolation processing unit 54 do not have an image signal withrespect to the N pixel (non-polarization pixel) region of the inputimage, as illustrated in FIG. 6. However, the parallax detecting unit 55calculates the left eye image to which an interpolation pixel valuebased on the left eye image signal (vertical polarization image signal)66 a is set and the right eye image to which the interpolation pixelvalue based on the right eye image signal (horizontal polarization imagesignal) 66 b is set with respect to the N pixel (non-polarization pixel)not having the pixel value, and calculates the distance informationcorresponding to all of the pixels by the matching processing betweenthe images.

As the pixel value interpolation processing, linear interpolationprocessing can be used.

The parallax image generating unit 56 generates two images of a left eyeimage (L image) 71 and a right eye image (R image) 72, using the 2D-RGBimage 63, which is the two-dimensional image output from thedemosaicking processing unit 53, and the depth map 67 corresponding tothe parallax information output from the parallax detecting unit 55.

That is, the parallax image generating unit 56 executes image conversionprocessing for setting the parallax according to the object distance onthe basis of the depth map 67 corresponding to the parallax informationwith respect to the 2D-RGB image 63, generates the left eye image (Limage) 71 and the right eye image (R image) 72, and outputs the left eyeimage and the right eye image.

The image conversion processing that is executed by the parallax imagegenerating unit 56 is processing for generating the left eye image (Limage) 71 and the right eye image (R image) 72 to be applicable tothree-dimensional image display by the image conversion based on onetwo-dimensional image (2D image) and outputting the left eye image andthe right eye image and is generally referred to as 2D3D conversionprocessing.

As the 2D3D conversion processing for generating the left eye image (Limage) 71 and the right eye image (R image) 72 to be applicable to thethree-dimensional image display by the image conversion based on onetwo-dimensional image (2D image), various processing is suggested. Inthe parallax image generating unit 56, the 2D3D conversion processing towhich the existing method is applied is executed.

Specifically, the parallax image generating unit 56 executes image shiftprocessing according to the parallax with respect to the 2D-RGB image63, using the depth map 67 corresponding to the parallax informationoutput from the parallax detecting unit 55, and generates the two imagesof the left eye image (L image) 71 and the right eye image (R image) 72.

For example, 2D3D conversion using a configuration described in theprevious Japanese Patent Application No. 2009-283080 of the applicantsmay be executed.

As such, the parallax image generating unit 56 executes 2D3D conversionprocessing for executing parallax setting according to the objectdistance using the depth map 67 input from the parallax detecting unit55 with respect to the 2D-RGB image 63 input from the demosaickingprocessing unit 53, generates the left eye image (L image) 71 and theright eye image (R image) 72 applied to the 3D image display, andoutputs the left eye image and the right eye image through the imageoutput unit 57.

As described above, the image processing unit 17 illustrated in FIG. 5acquires the images from the different viewing points acquired accordingto the polarizer arranged on the imaging element 16, that is, the lefteye image and the right eye image, and generates the depth mapcorresponding to the parallax information on the basis of the images.

The image processing unit 17 acquires a normal 2D image by the pixels inwhich the polarizer is not arranged and outputs high-definition left andright eye images applied to the 3D image display by image processingfrom information thereof.

In the embodiment described above, the first polarizing unit 12described with reference to FIGS. 1A to 1C has the configuration inwhich the horizontal polarization region is set to the right side andthe vertical polarization region is set to the left side. However, thesetting may be inverted.

In addition to the combination of the horizontally polarized light andthe vertically polarized light, any combination of polarization regionsthat have two different polarization directions, such as polarizationregions transmitting polarized light of oblique directions, may beapplied.

The second polarizing unit 15 should set to the polarization regionshaving the same combination as the polarization regions set to the firstpolarizing unit 12, to correspond to the setting of the polarizationregions of the first polarizing unit 12.

[2. Specific Processing Example of Interpolation Processing]

The image correcting unit 52 of the image processing unit 17 of FIG. 5described above executes processing for inputting the N pixel(non-polarization pixel) signal 61 input from the polarization pixelseparating unit 51 and including the total transmission pixels andsetting the pixel value of the PL pixel (polarization pixel) region notincluded in the N pixel signal (non-polarization pixel) signal 61 by theinterpolation processing.

As illustrated in FIGS. 7A and 7B, the imaging apparatus 10 has aconfiguration in which a mode to photograph an image can be switchedinto a 2D mode to photograph a 2D image and a 3D mode to photograph theleft eye image and the right eye image to be applicable to the 3D imagedisplay.

As illustrated in FIGS. 7A and 7B, the first polarizing unit 12 is setto an optical path in the 3D mode and the first polarizing unit 12 isremoved from the optical path in the 2D mode.

When an image is photographed in the 3D mode, the following images arephotographed in the PL pixels (polarization pixels), as described above.

The left eye image (image viewed from the center of gravity point 31 ofFIG. 1B) is photographed in the vertical polarization pixels and theright eye image (image viewed from the center of gravity point 32 ofFIG. 1B) is photographed in the horizontal polarization pixels. In the Npixels (non-polarization pixels), which are the total transmissionpixels, an image viewed from the center of the lens (image viewed fromthe center point 33 of FIG. 1B) is photographed.

Meanwhile, in the setting of the 2D mode illustrated in FIG. 7B, becausethe first polarizing unit 12 is not on the optical path, light incidenton the imaging element 16 is only controlled by the second polarizingunit 15.

In this case, in all of the vertical polarization pixels and thehorizontal polarization pixels corresponding to the PL pixels(polarization pixels) and the total transmission pixels corresponding tothe N pixels (non-polarization pixels), images viewed from the center ofthe lens (images viewed from the center point 33 of FIG. 1B) arephotographed.

However, the incident light amounts of the vertical polarization pixelsand the horizontal polarization pixels corresponding to the PL pixels(polarization pixels) become smaller than the incident light amounts ofthe N pixels (non-polarization pixels) by polarization processing. Thatis, the brightness decreases. This is the same in the photographingprocessing in the 3D mode.

The image correcting unit 52 described above with reference to FIG. 5executes processing for inputting only the N pixel (non-polarizationpixel) signal 61 input from the polarization pixel separating unit 51and including the total transmission pixels and setting the pixel valueof the PL pixel (polarization pixel) region not included in the N pixel(non-polarization pixel) signal 61 by the interpolation processing.

In an embodiment to be described below, as illustrated in FIG. 8, theimage correcting unit 100 receives a total pixel signal 81 from thepolarization pixel separating unit 51.

That is, the image correcting unit 100 receives the N pixel(non-polarization pixel) signal configured by the total transmissionpixels and the PL pixel (polarization pixel) signal.

The image correcting unit 100 illustrated in FIG. 8 receives all of thesignals generated by the imaging element and generates an interpolationimage (2D-Raw image) 62.

Hereinafter, a plurality of examples of specific processing that isexecuted by the image correcting unit 52 will be described sequentially.The following processing aspects will be described sequentially.

-   (1). Interpolation Processing Example with respect to Image    Photographed in 2D Image Photographing Mode-   (2). Interpolation Processing Example 1 with respect to Image    Photographed in 3D Image Photographing Mode-   (3). Interpolation Processing Example 2 with respect to Image    Photographed in 3D Image Photographing Mode-   (4). Interpolation Processing Example 3 with respect to Image    Photographed in 3D Image Photographing Mode    [2-(1). Interpolation Processing Example with Respect to Image    Photographed in 2D Image Photographing Mode]

First, an interpolation processing example with respect to an imagephotographed in the 2D image photographing mode to photograph a 2D imagein the imaging apparatus will be described.

A detailed configuration of the image correcting unit 100 illustrated inFIG. 8 is illustrated in FIG. 9.

As illustrated in FIG. 9, the image correcting unit 100 includes abrightness correcting unit 101, a gradient detecting unit 102, areflection detecting unit 103, and an interpolation processing unit 104.

As described above, the image correcting unit 100 receives the totalpixel signal 81 from the polarization pixel separating unit 51illustrated in FIG. 8.

That is, the image correcting unit 100 receives the N pixel(non-polarization pixel) signal configured by the total transmissionpixels and the PL pixel (polarization pixel) signal.

The brightness correcting unit 101 of the image correcting unit 100first corrects brightness of the PL pixel and the PL pixel adjacentpixel included in the total pixel signal 81.

As described above, in the PL pixel (polarization pixel), the incidentlight amount is restricted by the polarization processing by the secondpolarizing unit 15 and the pixel value (brightness) decreases ascompared with the N pixel (non-polarization pixel), which is the totaltransmission pixel.

In the N pixel adjacent to the PL pixel, the brightness decreases ascompared with the N pixel of which all of the peripheral pixels are theN pixels. This is because light leaked from the adjacent pixels (PLpixels) decreases in the N pixels adjacent to the PL pixel.

Therefore, the brightness correcting unit 101 corrects the brightness ofthe PL pixel and the PL pixel adjacent pixel included in the total pixelsignal 81. For example, the brightness correcting unit 101 executesbrightness correction to match the brightness of the polarization regionpixel (PL pixel) and the pixel adjacent to the polarization region pixel(pixel adjacent to the PL pixel) with the brightness of the totaltransmission region pixel (N pixel) corresponding to the totaltransmission region.

A specific processing example will be described below.

A brightness correction image 121 that is generated by the brightnesscorrecting unit 101 is output to the gradient detecting unit 102, thereflection detecting unit 103, and the interpolation processing unit104.

The gradient detecting unit 102 receives the brightness correction image121 generated by the brightness correcting unit 101 and performsdetection of the gradient direction of the pixel value with respect toeach PL pixel, which is the interpolation object pixel, on the basis ofthe pixel value of the N pixel region around the PL pixel.

That is, the gradient detecting unit 102 generates gradient informationcorresponding to pixel value change rates of a plurality of directionsof the peripheral pixels in units of polarization region pixels (PLpixels). This processing is the same processing as edge detection. Thechange rates of the pixels are calculated as gradient coefficients offour directions, which are a horizontal gradient coefficient: Hgrad, avertical gradient coefficient: Vgrad, an upward sloping gradientcoefficient: Agrad, and a downward sloping gradient coefficient: Dgrad.

Gradient information 122 that includes the gradient coefficients isinput to the interpolation processing unit 104.

The reflection detecting unit 103 receives the brightness correctionimage 121 that is generated by the brightness correcting unit 101 anddetermines whether a reflection light component is included with respectto each PL pixel.

Specific polarized light, in this example, vertically polarized light orhorizontally polarized light, is selectively incident on the PL pixel(polarization pixel).

For example, in light reflected from a surface of water or glass, apolarized light component of a specific direction strongly appears. Ifthe reflection light is included in a photographed image, a deviation,in which one of the pixel values of the horizontal polarization pixeland the vertical polarization pixel of the PL pixels may increase andthe other may decrease, is caused.

The reflection detecting unit 103 determines whether the reflectionlight is included in the photographed image. A specific example of thedetermination processing will be described below.

Reflection information 123 that is detected by the reflection detectingunit 103 is input to the interpolation processing unit 104.

The interpolation processing unit 104 receives the brightness correctionimage 121 that is generated by the brightness correcting unit 101, thegradient information 122 that is generated by the gradient detectingunit 102, and the reflection information 123 that is detected by thereflection detecting unit 103.

The interpolation processing unit 104 executes pixel interpolationprocessing as correction processing of the pixel value of the PL pixelregion. When the interpolation processing unit 104 executes theinterpolation processing, the interpolation processing unit 104 uses thegradient information 122 generated by the gradient detecting unit 102and the reflection information 123 detected by the reflection detectingunit 103 and executes the interpolation processing according to aninterpolation aspect determined according to the information.

A specific processing example will be described below.

As the result of the interpolation processing, the 2D-Raw image 62 thatis the output of the image correcting unit 100 illustrated in FIG. 8 isgenerated.

FIG. 10 is a flowchart illustrating a sequence of processing that isexecuted by the image correcting unit 100.

Processing of each step will be described.

In step S101, the image correcting unit 100 receives an image S (Rawimage) that is photographed in the 2D mode (non-setting of the firstpolarizing unit).

Next, in step S102, the image correcting unit 100 generates a brightnesscorrection image T by the brightness correction processing of the PLpixel region and the PL pixel peripheral area.

This processing is processing that is executed by the brightnesscorrecting unit 101 illustrated in FIG. 9.

Next, in step S103, the image correcting unit 100 detects the imagegradient (edge direction) on the basis of the brightness correctionimage T.

This processing is processing that is executed by the gradient detectingunit 102 illustrated in FIG. 9.

Next, in step S104, the image correcting unit 100 detects whether thereis reflection light on the basis of the brightness correction image.

This processing is processing that is executed by the reflectiondetecting unit 103 illustrated in FIG. 9.

In step S105, with respect to the pixel (PL pixel) in which it isdetermined that the reflection light is not detected, the imagecorrecting unit 100 outputs the brightness corrected pixel value as itis.

Meanwhile, in step S105, with respect to the pixel (PL pixel) in whichit is determined that the reflection light is detected, the imagecorrecting unit 100 executes the correction processing, specifically,the interpolation processing using the peripheral N pixels as thereference pixels, in step S106.

The interpolation processing in step S106 is executed by determiningsetting directions of the reference pixels according to gradientinformation of three directions of a vertical direction, an upwardsloping direction, and a downward sloping direction, among the gradientinformation generated by the gradient detecting unit 102. Specifically,the N pixels of the specific direction in which the gradient is small,that is, the pixel value change is small, are selected as the referencepixels and the interpolation processing using the pixel values of thespecific direction, for example, the linear interpolation processing, isexecuted.

A specific example of the processing that is executed by the imagecorrecting unit 100 will be described with reference to FIG. 11.

FIG. 11 is a diagram illustrating an example of an input image (Rawimage) of the image correcting unit 100 and a setting example of anindex to determine an attribute of each pixel of the image.

An image illustrated in FIG. 11 has the same configuration as describedabove with reference to FIG. 4. That is, PL pixel (polarization pixel)regions of two rows in which the vertical polarization region 15V andthe horizontal polarization region 15H are set and are alternatelyarranged in units of rectangular regions including four pixels of 2×2and N pixel (non-polarization pixel) regions 15A, which are totaltransmission pixels of fourteen rows, are repetitively arranged in thevertical direction (Y direction).

When the 3D mode is set, the left eye image, which is the image from theleft viewing point, is photographed in the vertical polarization region15V and the right eye image, which is the image from the right viewingpoint, is photographed in the horizontal polarization region 15H.

In the 2D mode, the image from the same viewing point as the N pixel(non-polarization pixel) region 15A, that is, the image from the viewingpoint that is the lens center, is photographed in both of thepolarization regions 15V and 15H. However, the light amount decreases.

As illustrated in FIG. 11, an X direction index (X-coordinate attribute)and a Y direction index (Y coordinate attribute) are set to each pixel.

In the X direction index [xidx (x)], any one of 0 to 3 is set tocorrespond to each pixel.

In the Y direction index [yidx (y)], any one of 0 to 5 is set tocorrespond to each pixel.

The attributes of the pixels are determined on the basis of the valuesof the indexes. For example, yidx (y)=0, 5 show the N pixels notadjacent to the PL pixels, yidx (y)=1, 4 show the N pixels adjacent tothe PL pixels, and yidx (y)=2, 3 show the PL pixels.

The configurations of the indexes that show the pixel attributes areillustrated in FIG. 12.

As illustrated in FIG. 12, kinds of the indexes showing the pixelattributes are as follows.

-   (1) X Coordinate Attribute (X index) [xidx (x)]-   (2) Y Coordinate Attribute (Y index) [yidx (y)]-   (3) Viewing Point Attribute (viewing point index) [ep (x, y)]-   (4) Color Attribute (color index) [color (x, y)]

A correspondence relation between a value of each attribute (index) andidentification information is as follows.

-   (1) X Coordinate Attribute (X index) [xidx (x)]-   xidx (x)=0, 1: left eye pixels or non-polarization (total    transmission) pixels of column including left eye pixels-   xindx (x)=2, 3: right eye pixels or non-polarization (total    transmission) pixels of column including right eye pixels-   (2) Y Coordinate Attribute (Y index) [yidx (y)]-   yindx (y)=0, 5: non-polarization (total transmission) pixels apart    from polarization pixel (PL pixel)-   yindx (y)=1, 4: non-polarization (total transmission) pixels    adjacent to polarization pixel (PL pixel)-   yindx (y)=2, 3: polarization pixels (PL pixels)-   (3) Viewing Point Attribute (viewing point index) [ep (x, y)]-   ex (x, y)=0: total transmission pixel (non-polarization pixel)-   ex (x, y)=−1: left eye pixel (vertical polarization pixel)-   ex (x, y)=+1: right eye pixel (horizontal polarization pixel)-   (4) Color Attribute (color index) [color (x, y)]-   Color (x, y)=0: red (R) pixel-   Color (x, y)=1: green (G) pixel-   Color (x, y)=2: blue (B) pixel

The image correcting unit 100 sets the index to correspond to the pixelof the input processing object image and executes processing based onthe index information.

FIG. 13 is a diagram illustrating a setting example of each index of (1)an X coordinate attribute (X index) [xidx (x)] and (2) a Y coordinateattribute (Y index) [ydix (y)].

FIG. 13 illustrates an example in which coordinates of (xbase, ybase) ofa pixel of a left upper end of an image are set as reference coordinatesand setting is performed on the basis of a relative position from areference point.

When the image correcting unit 100 executes processing with respect tothe pixel of the input processing object image, the image correctingunit 100 determines the index (attribute) set to the pixel, determines aprocessing aspect, and sequentially executes processing.

Next, a specific example of processing that is executed in eachstructural element of the image correcting unit 100 illustrated in FIG.9 will be described with reference to FIG. 14.

(Specific Example of Processing of Brightness Correcting Unit 101)

First, a specific example of the brightness correction processing thatis executed by the brightness correcting unit 101 illustrated in FIG. 9will be described with reference to FIG. 14.

The processing corresponds to processing of step S102 in a flowchart ofFIG. 10.

As described above, the brightness correcting unit 101 receives a totalpixel signal 81 from the polarization pixel separating unit 51illustrated in FIG. 8.

That is, the brightness correcting unit 101 receives the N pixel(non-polarization pixel) signal configured by the total transmissionpixels and the PL pixel (polarization pixel) signal.

The brightness correcting unit 101 corrects the brightness of the PLpixel and the PL pixel adjacent pixel included in the total pixel signal81. As described above, in the PL pixel (polarization pixel), theincident light amount is restricted by the polarization processing bythe second polarizing unit 15 and the pixel value (brightness) decreasesas compared with the N pixel (non-polarization pixel), which is thetotal transmission pixel.

In the N pixel adjacent to the PL pixel, the brightness decreases ascompared with the N pixel of which all of the peripheral pixels are theN pixels. This is because light leaked from the adjacent pixels (PLpixels) decreases in the N pixels adjacent to the PL pixel.

Therefore, the brightness correcting unit 101 corrects the brightness ofthe PL pixel and the PL pixel adjacent pixel included in the total pixelsignal 81.

FIG. 14 is a diagram illustrating a flow of a sequence of brightnesscorrection executed by the brightness correcting unit 101 and a specificexample of brightness correction processing.

Processing of each step of the flow will be described.

First, in step S121, the brightness correcting unit 101 sequentiallyselects the PL pixels and the PL pixel adjacent pixels that become thebrightness correction objects.

As illustrated at the lower side (reference diagram) of FIG. 14, the PLpixels and the PL pixel adjacent pixels that become the brightnesscorrection objects are pixels having Y coordinate indexes: yidx (y)=1 to4.

The processing of step S122 and the following processing aresequentially executed for each pixel selected in step S121.

In step S122, the brightness correcting unit 101 selects the totaltransmission (non-polarization) pixels positioned at the upper and lowersides of the same column of the selected pixels, having the same color,and not adjacent to the PL pixels as the reference pixels and acquiresthe pixel values of the reference pixels.

For example, in FIG. 14 (reference diagram), when pixels having the Ycoordinate indexes: yidx (y)=1, 2 are selected as the correction objectpixels, that is, when pixels included in a correction object region 141of FIG. 14 are selected, the reference pixels are selected from areference pixel region 142 and a reference pixel region 143 illustratedin FIG. 14.

When pixels having the Y coordinate indexes: yidx (y)=3, 4 are selectedas the correction object pixels, that is, when pixels included in acorrection object region 151 of FIG. 14 are selected, the referencepixels are selected from a reference pixel region 152 and a referencepixel region 153 illustrated in FIG. 14.

The total transmission (non-polarization) pixels that are positioned atthe upper and lower sides of the same column of the selected pixels,have the same color, and are not adjacent to the PL pixels are selectedfrom the upper and lower reference regions one by one and the pixelvalues thereof are acquired.

Next, in step S123, the brightness correcting unit 101 calculates aweighting average value [VVLerp] obtained by multiplying the weightaccording to the distance with the correction object pixel on the basisof the pixel values of the upper and lower two reference pixels.

In step S124, the brightness correcting unit 101 calculates gain G (x,y) on the basis of the weighting average value [VVLerp] and the pixelvalue [S (x, y)] of the correction object pixel.

The gain is calculated according to the following expression.G(x,y)=(VVLerp)/(S(x,y))

Finally, in step S125, the brightness correcting unit 101 multiplies thepixel value [S (x, y)] of the correction object pixel with the gain G(x, y) and calculates the brightness correction pixel value.

The brightness correcting unit 101 executes the processing with respectto the PL pixels and the PL pixel adjacent pixels, corrects thebrightness, sets the obtained values as the pixel values of the PLpixels and the PL pixel adjacent pixels, and generates the brightnesscorrection image T.

(Specific Example of Processing of Gradient Detecting Unit 102)

Next, a specific example of the gradient detection processing that isexecuted by the gradient detecting unit 102 illustrated in FIG. 9 willbe described with reference to FIG. 15.

This processing corresponds to the processing of step S103 in theflowchart of FIG. 10.

As described above, the gradient detecting unit 102 receives thebrightness correction image 121 generated by the brightness correctingunit 101 and detects the gradient direction of the pixel value withrespect to each of the PL pixels, which are the interpolation objectpixels, on the basis of the pixel value of the N pixel region around thePL pixels. This processing is the same processing as the edge detection.The change rates of the pixels are calculated as gradient coefficientsof four directions, including a horizontal gradient coefficient: Hgrad,a vertical gradient coefficient: Vgrad, an upward sloping gradientcoefficient: Agrad, and a downward sloping gradient coefficient: Dgrad.

Processing of each step of the flow will be described.

First, in step S151, the gradient detecting unit 102 sequentiallyselects the processing object pixels from the PL pixels becoming theinterpolation processing objects.

Next, the gradient detecting unit 102 sequentially executes theprocessing of step S152 with respect to the selected pixels.

In step S152, the gradient detecting unit 102 selects the totaltransmission (non-polarization) pixels positioned at the upper and lowersides around the selected pixels and having the same color as thereference pixels and executes the gradient detection processing based onthe pixel values of the reference pixels.

Specifically, the gradient detecting unit 102 calculates gradientcoefficients of four directions, including a horizontal gradientcoefficient: Hgrad, a vertical gradient coefficient: Vgrad, an upwardsloping gradient coefficient: Agrad, and a downward sloping gradientcoefficient: Dgrad, using the pixel values of the reference pixels ofthe N pixel region.

As illustrated at the lower side (reference diagram) of FIG. 15, acalculation example of the vertical gradient coefficient: Vgrad isillustrated.

The selected pixel is a G pixel 161 that is positioned in the PL pixelregion. The selected pixel is the G pixel 161 of xidx (x)=3 and yidx(y)=2.

When the vertical gradient coefficient with respect to the G pixel 161,which is the selected pixel, is calculated, the following processing isexecuted.

The brightness difference is calculated on the basis of the two upperand lower G pixels of the N pixel region of xidx=2, which is a leftadjacent column of the selected pixel.

The brightness difference is calculated on the basis of the two upperand lower G pixels of the N pixel region of xidx (x)=3, which are thesame column as the selected pixel.

The brightness difference is calculated on the basis of the two upperand lower G pixels of the N pixel region of xidx=0, which are a rightadjacent column of the selected pixel.

The three brightness differences are calculated, the weight according tothe distance from the selected pixel (G pixel 161) is set, the threebrightness differences are added, and the vertical gradient coefficientVgrad is calculated.

The gradient coefficients of the horizontal gradient coefficient: Hgrad,the vertical gradient coefficient: Vgrad, the upward sloping gradientcoefficient: Agrad, and the downward sloping gradient coefficient: Dgradare calculated by changing the combination of the reference pixelsaccording to each direction.

As such, in step S152, the total transmission (non-polarization) pixelsthat are positioned at the upper and lower sides around the selectedpixel and have the same color are selected as the reference pixels andthe gradient detection processing based on the pixel values of thereference pixels is executed.

(Specific Example of Processing of Reflection Detecting Unit 103)

Next, a specific example of the reflection detection processing that isexecuted by the reflection detecting unit 103 illustrated in FIG. 9 willbe described with reference to FIG. 16.

This processing corresponds to the processing of step S104 in theflowchart of FIG. 10.

As described above, the reflection detecting unit 103 receives thebrightness correction image 121 generated by the brightness correctingunit 101 and determines whether reflection light is included withrespect to each PL pixel.

The processing of each step of the flow will be described.

First, in step S161, the reflection detecting unit 103 sequentiallyselects the processing object pixels from the PL pixels becoming theinterpolation processing objects.

Next, the reflection detecting unit 103 sequentially executes theprocessing of step S162 with respect to the selected pixels.

In step S162, the reflection detecting unit 103 executes the reflectiondetection processing based on the pixel values of the peripheral pixels(PL pixels) of the horizontal direction of the row of the selectedpixels. Specifically, the reflection detecting unit 103 executesapplication processing of the reflection detection filter.

As described above, specific polarized light, in this example,vertically polarized light or horizontally polarized light, isselectively incident on the PL pixel (polarization pixel).

For example, in light reflected from a surface of water or glass, apolarized light component of a specific direction strongly appears. Ifthe reflection light is included in a photographed image, a deviation,in which one of the pixel values of the horizontal polarization pixeland the vertical polarization pixel of the PL pixels may increase andthe other may decrease, is caused.

As illustrated in FIG. 16 (reference diagram), when the brightnessdifference (difference of the pixel values) due to the polarization isgenerated in the vertical polarization region and the horizontalpolarization region, it can be determined that the reflection light isincluded.

Presence or absence of the deviation of the brightness based on thepolarization is detected using the reflection detection filter.

The specific processing will be described with reference to FIGS. 17 to20.

The reflection detection processing using the reflection detectionfilter is executed according to the following processing sequence: a.calculation of a parameter: Href (x, y) (refer to FIG. 17), b.calculation of a parameter: Hnoref (x, y) (refer to FIG. 18), c.calculation of parameters: ref (x, y) and noref (x, y) (refer to FIG.19), and d. determination of a reflection presence determination resultrefDetect (x, y) (refer to FIG. 20).

First, processing of a. calculation of a parameter: Href (x, y) will bedescribed with reference to FIG. 17.

As the reflection detection filter, two filters of the settingillustrated in FIG. 17 are used. That is, the two filters in which thefollowing coefficients are set as the coefficients multiplied withrespect to the seven pixels in the x direction are used.

-   Filter 0: +1, −2, −3, +4, +3, −2, −1-   Filter 1: −1, −2, +3, +4, −3, −2, +1,

The two kinds of filters in which the above coefficients are set areapplied.

As illustrated in FIG. 17, when the parameter: Href (x, y) iscalculated, the selected pixel of the PL pixel that is selected as thereflection detection processing object calculates the parameter: Href(x, y) by applying the filter 1, in the case of xidx (x)=0, 2, asillustrated in FIG. 17(a 1).

FIG. 17(a 1) illustrates filter application processing when the selectedpixel is the R pixel shown by a dotted circle.

In this case, the pixel values of the R pixel, the three left pixels,and the three right pixels are multiplied by each coefficient of thefilter 1, the pixel values are added, and the parameter: Href (x, y) iscalculated.

In addition, the selected pixel of the PL pixel that is selected as thereflection detection processing object calculates the parameter: Href(x, y) by applying the filter 0, in the case of xidx (x)=1, 3, asillustrated in FIG. 17(a 2).

FIG. 17(a 2) illustrates filter application processing when the selectedpixel is the G pixel shown by a dotted circle.

In this case, the pixel values of the G pixel, the three left pixels,and the three right pixels are multiplied by each coefficient of thefilter 0, the pixel values are added, and the parameter: Href (x, y) iscalculated.

Next, processing of b. calculation of a parameter: Hnoref (x, y) will bedescribed with reference to FIG. 18.

As the reflection detection filter, the same filters as the filtersdescribed with reference to FIG. 17 are applied. That is, the twofilters in which the following coefficients are set as the coefficientsmultiplied with respect to the seven pixels in the x direction areapplied.

-   Filter 0: +1, −2, −3, +4, +3, −2, −1-   Filter 1: −1, −2, +3, +4, −3, −2, +1,

The two kinds of filters in which the above coefficients are set areapplied.

When the processing of b. calculation of a parameter: Hnoref (x, y)illustrated in FIG. 18 is executed, filer application processing that isinverse to the filter application aspect of the calculation processingof the parameter: Href (x, y) described with reference to FIG. 17 isexecuted.

That is, as illustrated in FIG. 18, when the parameter: Hnoref (x, y) iscalculated, the selected pixel of the PL pixel that is selected as thereflection detection processing object calculates the parameter: Hnoref(x, y) by applying the filter 0, in the case of xidx (x)=0, 2, asillustrated in FIG. 18(b 1).

FIG. 18(b 1) illustrates filter application processing when the selectedpixel is the R pixel shown by a dotted circle.

In this case, the pixel values of the R pixel, the three left pixels,and the three right pixels are multiplied with each coefficient of thefilter 0, the pixel values are added, and the parameter: Hnoref (x, y)is calculated.

In addition, the selected pixel of the PL pixel that is selected as thereflection detection processing object calculates the parameter: Hnoref(x, y) by applying the filter 1, in the case of xidx (x)=1, 3, asillustrated in FIG. 18(b 2).

FIG. 18(b 2) illustrates filter application processing when the selectedpixel is the G pixel shown by a dotted circle.

In this case, the pixel values of the G pixel, the three left pixels,and the three right pixels are multiplied by each coefficient of thefilter 1, the pixel values are added, and the parameter: Hnoref (x, y)is calculated.

Next, processing of c. calculation of parameters: ref (x, y) and noref(x, y) will be described with reference to FIG. 19.

The parameters: ref (x, y) and noref (x, y) are calculated by thefollowing expressions.

In the case of yidx (y)=2, ref (x, y)=Href (x, y)+H (ref (x, y+1) andnoref (x, y)=Hnoref (x, y)+Hnoref (x, y+1)

In the case of yidx (y)=3, ref (x, y)=Href (x, y−1)+H (ref (x, y)) andnoref (x, y)=Hnoref (x, y−1)+Hnoref (x, y)

FIG. 19 (reference diagram) illustrates the calculation processingexample of ref (x, y)=Href (x, y)+H (ref (x, y+1)) in the case of yidx(y)=2.

The sum of the value of Href in the two rows of the PL pixels iscalculated and ref (x, y) is calculated.

Next, determination processing of d. a reflection presence determinationresult: refDetect (x, y) will be described with reference to FIG. 20.

The determination processing of d. a reflection presence determinationresult: refDetect (x, y) is executed as the determination processingbased on the parameters: ref (x, y) and noref (x, y) described withreference to FIG. 19.

Specifically, as illustrated in FIG. 20, when a conditional expressionof any one of ref (x, y)≦noref (x, y), ref (x, y)≦noref (x, y+2), ref(x, y)≦ref (x, y+2), ref (x, y)≦noref (x, y−2), and ref (x, y)≦noref (x,y−2), is realized, refDetect (x, y)=false, that is, it is determinedthat there is no reflection in the pixel.

When none of the conditional expressions is realized, refDetect (x,y)=true, that is, it is determined that there is reflection in thepixel.

The reflection detecting unit 103 illustrated in FIG. 9 executes theprocessing described with reference to FIGS. 17 to 20 with respect toeach of the PL pixels and determines whether the reflection light isincluded with respect to the PL pixel. The reflection detecting unit 103generates reflection light presence information corresponding to the PLpixel as the reflection information 123 illustrated in FIG. 9 andoutputs the information to the interpolation processing unit 104.

(Specific Example of Processing of Interpolation Processing Unit 104)

Next, a specific example of the interpolation processing that isexecuted by the interpolation processing unit 104 illustrated in FIG. 9will be described with reference to FIGS. 21 and 22.

This processing corresponds to the processing of step S106 in theflowchart of FIG. 10.

The interpolation processing unit 104 receives the brightness correctionimage 121 that is generated by the brightness correcting unit 101, thegradient information 122 that is generated by the gradient detectingunit 102, and the reflection information 123 that is detected by thereflection detecting unit 103, as described with reference to FIG. 9.

The interpolation processing unit 104 executes pixel interpolationprocessing as correction processing of the pixel value of the PL pixelregion. When the interpolation processing unit 104 executes theinterpolation processing, the interpolation processing unit 104 uses thegradient information 122 generated by the gradient detecting unit 102and the reflection information 123 detected by the reflection detectingunit 103 and executes the interpolation processing according to aninterpolation aspect determined according to the information.

As the result of the interpolation processing, the 2D-Raw image 62 thatis the output of the image correcting unit 100 illustrated in FIG. 8 isgenerated.

FIGS. 21 and 22 are flowcharts illustrating sequences of theinterpolation processing that is executed by the interpolationprocessing unit 104.

The processing of each step of the flowcharts illustrated in FIGS. 21and 22 will be described.

First, in step S171, the interpolation processing unit 104 sequentiallyselects the processing object pixels from the PL pixels becoming theinterpolation processing objects.

Next, the interpolation processing unit 104 sequentially executes theprocessing of step S172 and the following processing.

In step S172, the interpolation processing unit 104 executes analysisprocessing of reflection information corresponding to one PL pixelselected as the interpolation processing object, that is, the reflectioninformation 123 generated by the reflection detecting unit 103illustrated in FIG. 9.

Specifically, the interpolation processing unit 104 determines whetherreflection light is included in a pixel value of the one PL pixelselected as the interpolation processing object.

In step S173, when it is determined that the reflection light isincluded in the selected pixel, the processing proceeds to step S174.

In step S173, when it is determined that the reflection light is notincluded in the selected pixel, the processing ends without executingthe interpolation processing. In this case, with respect to the PL pixelnot including the reflection light, the PL pixel in which the brightnessis corrected by the brightness correcting unit 101 is output.

Meanwhile, in step S173, when it is determined that the reflection lightis included in the selected pixel, the processing proceeds to step S174and the interpolation processing in which the N pixel is applied as thereference pixel is executed.

In step S174, the interpolation processing unit 104 executes analysisprocessing of the gradient information corresponding to the one PL pixelselected as the interpolation processing object, that is, the gradientinformation 122 generated by the gradient detecting unit 102.Specifically, the interpolation processing unit 104 executes comparisonprocessing of the three gradient coefficients of the vertical gradientcoefficient: Vgrad, the upward sloping gradient coefficient: Agrad, andthe downward sloping gradient coefficient: Dgrad that are included inthe gradient information 122 generated by the gradient detecting unit102. The interpolation processing unit 104 compares the gradientcoefficients and selects a direction (Dir) having a high correlation.

The direction in which the gradient coefficient is large is a directionin which a change rate of the pixel value is high.

The interpolation processing unit 104 compares the three gradientcoefficients and selects a direction in which the gradient coefficientis smallest as the direction (Dir) having the high correlation.

The direction (Dir) that has the high correlation corresponds to adirection in which a change rate of the pixel value is small, that is,an edge direction.

Next, in step S175, the interpolation processing unit 104 determineswhether the upward sloping gradient coefficient: Agrad is smallest andthe correlation of the upward sloping direction is highest on the basisof the comparison of the three gradient coefficients of the verticalgradient coefficient: Vgrad, the upward sloping gradient coefficient:Agrad, and the downward sloping gradient coefficient: Dgrad.

In step S175, when it is determined that the correction of the upwardsloping direction is highest, the processing proceeds to step S177.

In other cases, the processing proceeds to step S176.

When it is determined that the correlation of the upward slopingdirection is highest in step S175, and the processing proceeds to stepS177, in step S177, the interpolation processing unit 104 executes theinterpolation processing using the reference pixels of the upwardsloping direction, with respect to the selected interpolation objectpixels (PL pixels). The pixels that are selected as the reference pixelsare pixels that have the same colors as the selected interpolationobject pixels (PL pixels) and are at least the N pixels(non-polarization pixels) that are closest to the interpolation objectpixels (PL pixels).

Specifically, the interpolation processing unit 104 selects the two ormore pixels having the same color in the upper N pixel region and thelower N pixel region of the PL pixel region along the line of the upwardsloping direction of the selected interpolation object pixels (PLpixels) as the reference pixels and executes the linear interpolationprocessing to which the pixel values of the reference pixels areapplied.

Meanwhile, in step S175, when it is determined that the correlation ofthe upward sloping direction is not highest, the processing proceeds tostep S176. In step S176, the interpolation processing unit 104determines whether the downward sloping gradient coefficient: Dgrad issmallest and the correlation of the downward sloping direction ishighest on the basis of the comparison of the three gradientcoefficients of the vertical gradient coefficient: Vgrad, the upwardsloping gradient coefficient: Agrad, and the downward sloping gradientcoefficient: Dgrad.

In step S176, when it is determined that the correlation of the downwardsloping direction is highest, the processing proceeds to step S178.

In other cases, the processing proceeds to step S179.

When it is determined that the correlation of the upward slopingdirection is highest in step S176 and the processing proceeds to stepS178, in step S178, the interpolation processing unit 104 executes theinterpolation processing using the reference pixels of the downwardsloping direction with respect to the selected interpolation objectpixels (PL pixels). The pixels that are selected as the reference pixelsare pixels that have the same colors as the selected interpolationobject pixels (PL pixels) and are at least the N pixels(non-polarization pixels) that are closest to the interpolation objectpixels (PL pixels).

Specifically, the interpolation processing unit 104 selects the two ormore pixels having the same color in the upper N pixel region and thelower N pixel region of the PL pixel region along the line of the upwardsloping direction of the selected interpolation object pixels (PLpixels) as the selected pixels and executes the linear interpolationprocessing to which the pixel values of the reference pixels areapplied.

In step S176, when it is determined that the correlation of the upwardsloping direction is not highest, the processing proceeds to step S179.

In step S179, the interpolation processing unit 104 executes theinterpolation processing using the reference pixels of the verticaldirection, with respect to the selected interpolation object pixels (PLpixels). The pixels that are selected as the reference pixels are pixelsthat have the same colors as the selected interpolation object pixels(PL pixels) and are the N pixels (non-polarization pixels) that areclosest to the interpolation object pixels (PL pixels).

Specifically, the interpolation processing unit 104 selects the two ormore pixels having the same color in the upper N pixel region and thelower N pixel region of the PL pixel region along the line of thevertical direction of the selected interpolation object pixels (PLpixels) as the reference pixels and executes the linear interpolationprocessing to which the pixel values of the reference pixels areapplied.

The interpolation processing example with respect to the imagephotographed in the 2D image photographing mode has been described.

For a summary of the interpolation processing, the processing that isexecuted by the image correcting unit 100 illustrated in FIGS. 8 and 9can be summarized as follows.

-   (a) Correction of the brightness of the PL pixel and the pixel    adjacent to the PL pixel with the same brightness level as the N    pixel not adjacent to the PL pixel-   (b) Detection of the gradient information corresponding to each PL    pixel becoming the interpolation processing object-   (c) Detection of reflection information on whether reflection light    is included in each PL pixel becoming the interpolation processing    object-   (d) Output of the PL pixel in which the brightness correction and    the interpolation processing using the N pixels of the direction    having the high correlation selected from the three directions of    the vertical direction, the upward sloping direction, and the    downward sloping direction as the reference pixels are performed,    when the PL pixel becoming the interpolation processing object    includes the reflection light-   (e) Output of the PL pixel in which the brightness correction is    performed, when the PL pixel becoming the interpolation processing    object does not include the reflection light

The image correcting unit 100 generates the interpolation image, thatis, the interpolation image (2D-Raw image) 62 illustrated in FIG. 8, bythe processing.

[2-(2). Interpolation Processing Example 1 with respect to ImagePhotographed in 3D Image Photographing Mode]

Next, the interpolation processing example 1 with respect to the imagephotographed in the 3D image photographing mode will be described.

As described above with reference to FIG. 7, the imaging apparatus 10has a configuration in which a photographing mode of the image can beswitched into a 2D mode to photograph a 2D image and a 3D mode tophotograph a left eye image and a right eye image to be applicable todisplay of a three-dimensional image.

As illustrated in FIGS. 7A and 7B, the first polarizing unit 12 is setto the optical path in the 3D mode and the first polarizing unit 12 isremoved from the optical path in the 2D mode.

When an image is photographed in the 3D mode, the following images arephotographed in the PL pixels (polarization pixels), as described above.

The left eye image (image viewed from the center of gravity point 31 ofFIG. 1B) is photographed in the vertical polarization pixel and theright eye image (image viewed from the center of gravity point 32 ofFIG. 1B) is photographed in the horizontal polarization pixel. In the Npixel (non-polarization pixel), which is the total transmission pixel,an image viewed from the center of the lens (image viewed from thecenter point 33 of FIG. 1B) is photographed.

The interpolation processing example to be described below is an exampleof interpolation processing that is executed in the image correctingunit 100 with respect to the image photographed in the 3D mode.

In this embodiment, the entire configuration of the imaging apparatus isthe same as the configuration illustrated in FIGS. 1A to 1C and theconfiguration of the image processing unit 17 is the same as theconfiguration illustrated in FIG. 8.

The configuration of the image correcting unit 100 of the imageprocessing unit 17 is the same as the configuration illustrated in FIG.9 that has already been described in 2-(1). Interpolation ProcessingExample with respect to Image Photographed in 2D Image PhotographingMode.

As illustrated in FIG. 9, the image correcting unit 100 includes abrightness correcting unit 101, a gradient detecting unit 102, areflection detecting unit 103, and an interpolation processing unit 104.

As described above, the image correcting unit 100 receives the totalpixel signal 81 from the polarization pixel separating unit 51illustrated in FIG. 8.

That is, the image correcting unit 100 receives the N pixel(non-polarization pixel) signal configured by the total transmissionpixels and the PL pixel (polarization pixel) signal.

In this embodiment, the processing that is executed by the brightnesscorrecting unit 101, the gradient detecting unit 102, and the reflectiondetecting unit 103 of the image correcting unit 100 becomes the sameprocessing as the processing already described in 2-(1). InterpolationProcessing Example with respect to Image Photographed in 2D ImagePhotographing Mode.

That is, (a) the brightness correcting unit 101 executes the brightnesscorrection processing for correcting the brightness of the PL pixel andthe pixel adjacent to the PL pixel with the same brightness level as theN pixel not adjacent to the PL pixel.

-   (b) The gradient detecting unit 102 executes the detection of the    gradient information corresponding to each PL pixel becoming the    interpolation processing object.-   (c) The reflection detecting unit 103 executes the detection of the    reflection information on whether the reflection light is included    in each PL pixel becoming the interpolation processing object.

The processing described above becomes the same processing as theprocessing already described in 2-(1). Interpolation Processing Examplewith respect to Image Photographed in 2D Image Photographing Mode.

The processing in the interpolation processing unit 104 becomesprocessing that is different from the processing already described(processing described with reference to FIGS. 20 and 21).

FIG. 23 is a flowchart illustrating a sequence of processing that isexecuted by the image correcting unit 100 according to this embodiment.

In step S201, the image correcting unit 100 receives an image S (Rawimage) that is photographed in the 3D mode (setting of the firstpolarizing unit).

The processing of steps S202 to S205 to be described below becomes thesame processing as the processing of steps S102 to S105 alreadydescribed with reference to FIG. 10 in 2-(1). Interpolation ProcessingExample with respect to Image Photographed in 2D Image PhotographingMode.

That is, in step S202, the image correcting unit 100 generates abrightness correction image T by the brightness correction processing ofthe PL pixel region and the PL pixel peripheral area.

This processing is the processing that is executed by the brightnesscorrecting unit 101 illustrated in FIG. 9.

Next, in step S203, the image correcting unit 100 detects the imagegradient (edge direction) on the basis of the brightness correctionimage T.

This processing is the processing that is executed by the gradientdetecting unit 102 illustrated in FIG. 9.

Next, in step S204, the image correcting unit 100 detects whether thereis reflection light on the basis of the brightness correction image.

This processing is the processing that is executed by the reflectiondetecting unit 103 illustrated in FIG. 9.

In step S205, with respect to the pixel (PL pixel) in which it isdetermined that the reflection light is detected, the image correctingunit 100 executes the correction processing, specifically, theinterpolation processing using the peripheral N pixels as the referencepixels, in step S206.

The interpolation processing in step S206 is executed by determiningsetting directions of the reference pixels according to gradientinformation of three directions of a vertical direction, an upwardsloping direction, and a downward sloping direction, among the gradientinformation generated by the gradient detecting unit 102. Specifically,the N pixels of the specific direction in which the gradient is small,that is, in which the pixel value change is small, are selected as thereference pixels and the interpolation processing using the pixel valuesof the specific direction, for example, the linear interpolationprocessing, is executed.

This processing becomes the same processing as the processing of stepS106 already described with reference to FIG. 10 in 2-(1). InterpolationProcessing Example with respect to Image Photographed in 2D ImagePhotographing Mode.

In step S205, with respect to the pixel (PL pixel) in which it isdetermined that the reflection light is not detected, the imagecorrecting unit 100 executes the correction processing, specifically,the interpolation processing using the peripheral N pixels as thereference pixels, in step S207.

The interpolation processing in step S207 is executed by determiningsetting directions of the reference pixels according to the gradientinformation of four directions of a vertical direction, an upwardsloping direction, a downward sloping direction, and a horizontaldirection, among the gradient information generated by the gradientdetecting unit 102. Specifically, the N pixels of the specific directionin which the gradient is small, that is, in which the pixel value changeis small, are selected as the reference pixels and the interpolationprocessing using the pixel value of the specific direction, for example,the linear interpolation processing, is executed.

In the processing described with reference to FIG. 10 in 2-(1).Interpolation Processing Example with respect to Image Photographed in2D Image Photographing Mode, the pixels in which the brightness iscorrected are used as the output pixels without executing theinterpolation processing with respect to the PL pixel in which thereflection light is not detected.

However, in this embodiment, with respect to the PL pixel in which thereflection light is not detected, the reference pixels are determinedaccording to the gradient information and the interpolation processingusing the pixel values of the reference pixels is executed.

This point is different from the previous processing example.

That is, the interpolation processing aspect that is executed in theinterpolation processing unit 104 is different.

The interpolation processing that is executed by the interpolationprocessing unit 104 will be described with reference to flowchartsillustrated in FIGS. 24 to 26.

The interpolation processing unit 104 receives the brightness correctionimage 121 that is generated by the brightness correcting unit 101, thegradient information 122 that is generated by the gradient detectingunit 102, and the reflection information 123 that is detected by thereflection detecting unit 103, as described with reference to FIG. 9.

The interpolation processing unit 104 executes pixel interpolationprocessing as correction processing of the pixel value of the PL pixelregion. When the interpolation processing unit 104 executes theinterpolation processing, the interpolation processing unit 104 uses thegradient information 122 generated by the gradient detecting unit 102and the reflection information 123 detected by the reflection detectingunit 103 and executes the interpolation processing according to aninterpolation aspect determined according to the information.

As the result of the interpolation processing, the 2D-Raw image 62 thatis the output of the image correcting unit 100 illustrated in FIG. 8 isgenerated.

The processing of each step of the flowcharts that are illustrated inFIGS. 24 to 26 will be described.

First, in step S221, the interpolation processing unit 104 sequentiallyselects the processing object pixels from the PL pixels becoming theinterpolation processing objects.

Next, the processing of step S222 and the following processing aresequentially executed with respect to the selected pixels.

In step S222, the interpolation processing unit 104 executes analysisprocessing of the reflection information corresponding to one PL pixelselected as the interpolation processing object, that is, the reflectioninformation 123 generated by the reflection detecting unit 103illustrated in FIG. 9.

Specifically, the interpolation processing unit 104 determines whetherreflection light is included in a pixel value of the one PL pixelselected as the interpolation processing object.

In step S223, when it is determined that the reflection light isincluded in the selected pixel, the processing proceeds to step S224.

In step S223, when it is determined that the reflection light is notincluded in the selected pixel, the processing proceeds to step S241.

The interpolation processing of step S224 and the following steps whenit is determined that the reflection light is included in the selectedpixel becomes the same processing as the processing already describedwith reference to FIGS. 21 and 22 in 2-(1). Interpolation ProcessingExample with respect to Image Photographed in 2D Image PhotographingMode.

That is, in step S223, when it is determined that the reflection lightis included in the selected pixel, the processing proceeds to step S224and the interpolation processing unit 104 executes analysis processingof the gradient information corresponding to the one PL pixel selectedas the interpolation processing object, that is, the gradientinformation 122 generated by the gradient detecting unit 102.Specifically, the interpolation processing unit 104 executes comparisonprocessing of the three gradient coefficients of the vertical gradientcoefficient: Vgrad, the upward sloping gradient coefficient: Agrad, andthe downward sloping gradient coefficient: Dgrad that are included inthe gradient information 122 generated by the gradient detecting unit102. The interpolation processing unit 104 compares the gradientcoefficients and selects the direction (Dir) having the highcorrelation.

The direction in which the gradient coefficient is large is a directionin which a change rate of the pixel value is high.

The interpolation processing unit 104 compares the three gradientcoefficients and selects the direction in which the gradient coefficientis smallest as the direction (Dir) having the high correlation.

The direction (Dir) that has the high correlation corresponds to adirection in which a change rate of the pixel value is small, aso-called edge direction.

Next, in step S225, the interpolation processing unit 104 determineswhether the upward sloping gradient coefficient: Agrad is smallest andthe correlation of the upward sloping direction is highest on the basisof the comparison of the three gradient coefficients of the verticalgradient coefficient: Vgrad, the upward sloping gradient coefficient:Agrad, and the downward sloping gradient coefficient: Dgrad.

In step S225, when it is determined that the correction of the upwardsloping direction is highest, the processing proceeds to step S227.

In other cases, the processing proceeds to step S226.

When it is determined that the correlation of the upward slopingdirection is highest in step S225 and the processing proceeds to stepS227, in step S227, the interpolation processing unit 104 executes theinterpolation processing using the reference pixels of the upwardsloping direction, with respect to the selected interpolation objectpixels (PL pixels). The pixels that are selected as the reference pixelsare pixels that have the same colors as the selected interpolationobject pixels (PL pixels) and are at least the N pixels(non-polarization pixels) that are closest to the interpolation objectpixels (PL pixels).

Specifically, the interpolation processing unit 104 selects the two ormore pixels having the same color in the upper N pixel region and thelower N pixel region of the PL pixel region along the line of the upwardsloping direction of the selected interpolation object pixels (PLpixels) as the reference pixels and executes the linear interpolationprocessing to which the pixel values of the reference pixels areapplied.

Meanwhile, in step S225, when it is determined that the correlation ofthe upward sloping direction is not highest, the processing proceeds tostep S226. In step S226, the interpolation processing unit 104determines whether the downward sloping gradient coefficient: Dgrad issmallest and the correlation of the downward sloping direction ishighest on the basis of the comparison of the three gradientcoefficients of the vertical gradient coefficient: Vgrad, the upwardsloping gradient coefficient: Agrad, and the downward sloping gradientcoefficient: Dgrad.

In step S226, when it is determined that the correlation of the downwardsloping direction is highest, the processing proceeds to step S228.

In other cases, the processing proceeds to step S229.

When it is determined that the correlation of the downward slopingdirection is highest in step S226 and the processing proceeds to stepS228, in step S228, the interpolation processing unit 104 executes theinterpolation processing using the reference pixels of the downwardsloping direction with respect to the selected interpolation objectpixels (PL pixels). The pixels that are selected as the reference pixelsare pixels that have the same colors as the selected interpolationobject pixels (PL pixels) and are at least the N pixels(non-polarization pixels) that are closest to the interpolation objectpixels (PL pixels).

Specifically, the interpolation processing unit 104 selects the two ormore pixels having the same color in the upper N pixel region and thelower N pixel region of the PL pixel region along the line of thedownward sloping direction of the selected interpolation object pixels(PL pixels) as the reference pixels and executes the linearinterpolation processing to which the pixel values of the referencepixels are applied.

In step S226, when it is determined that the correlation of the downwardsloping direction is not highest, the processing proceeds to step S229.

In step S229, the interpolation processing unit 104 executes theinterpolation processing using the reference pixels of the verticaldirection with respect to the selected interpolation object pixels (PLpixels). The pixels that are selected as the reference pixels are pixelsthat have the same colors as the selected interpolation object pixels(PL pixels) and are at least the N pixels (non-polarization pixels) thatare closest to the interpolation object pixels (PL pixels).

Specifically, the interpolation processing unit 104 selects the two ormore pixels having the same color in the upper N pixel region and thelower N pixel region of the PL pixel region along the line of thevertical direction of the selected interpolation object pixels (PLpixels) as the reference pixels and executes the linear interpolationprocessing to which the pixel values of the reference pixels areapplied.

Next, processing when it is determined that the reflection light is notincluded in the PL pixel as the interpolation object pixel in step S223of the flow illustrated in FIG. 24 and the processing proceeds to stepS241 will be described.

This processing corresponds to the processing of step S207 of the flowillustrated in FIG. 23, that is, the interpolation processing when it isdetermined that the reflection light is not included in the PL pixel asthe interpolation object pixel.

In step S241 of the flow illustrated in FIG. 24, the interpolationprocessing unit 104 executes analysis processing of the gradientinformation corresponding to one PL pixel selected as the interpolationprocessing object, that is, the gradient information 122 generated bythe gradient detecting unit 102. Specifically, the interpolationprocessing unit 104 executes comparison processing of the four gradientcoefficients of the vertical gradient coefficient: Vgrad, the upwardsloping gradient coefficient: Agrad, the downward sloping gradientcoefficient: Dgrad, and the horizontal gradient coefficient: Hgrad thatare included in the gradient information 122 generated by the gradientdetecting unit 102. The interpolation processing unit 104 compares thegradient coefficients and selects the direction (Dir) having the highcorrelation.

The direction in which the gradient coefficient is large is a directionin which a change rate of the pixel value is high.

The interpolation processing unit 104 compares the four gradientcoefficients and selects the direction in which the gradient coefficientis smallest as the direction (Dir) having the high correlation.

The direction (Dir) that has the high correlation corresponds to adirection in which a change rate of the pixel value is small, that is,an edge direction.

Next, in step S242 illustrated in FIG. 26, the interpolation processingunit 104 determines whether the upward sloping gradient coefficient:Agrad is smallest and the correlation of the upward sloping direction ishighest on the basis of the comparison of the four gradient coefficientsof the vertical gradient coefficient: Vgrad, the upward sloping gradientcoefficient: Agrad, the downward sloping gradient coefficient: Dgrad,and the horizontal gradient coefficient: Hgrad.

In step S242, when it is determined that the correlation of the downwardsloping direction is highest, the processing proceeds to step S251.

In other cases, the processing proceeds to step S243.

When it is determined that the correlation of the upward slopingdirection is highest in step S242 and the processing proceeds to stepS251, in step S251, the interpolation processing unit 104 executes theinterpolation processing using the reference pixels of the upwardsloping direction with respect to the selected interpolation objectpixels (PL pixels). The pixels that are selected as the reference pixelsare pixels that have the same colors as the selected interpolationobject pixels (PL pixels) and are at least the N pixels(non-polarization pixels) that are closest to the interpolation objectpixels (PL pixels).

Specifically, the interpolation processing unit 104 selects the two ormore pixels having the same color in the upper N pixel region and thelower N pixel region of the PL pixel region along the line of the upwardsloping direction of the selected interpolation object pixels (PLpixels) as the reference pixels and executes the linear interpolationprocessing to which the pixel values of the reference pixels areapplied.

Meanwhile, in step S242, when it is determined that the correlation ofthe upward sloping direction is not highest, the processing proceeds tostep S243.

In step S243, the interpolation processing unit 104 determines whetherthe downward sloping gradient coefficient: Dgrad is smallest and thecorrelation of the downward sloping direction is highest on the basis ofthe comparison of the four gradient coefficients of the verticalgradient coefficient: Vgrad, the upward sloping gradient coefficient:Agrad, the downward sloping gradient coefficient: Dgrad, and thehorizontal gradient coefficient: Hgrad.

In step S243, when it is determined that the correlation of the downwardsloping direction is highest, the processing proceeds to step S252.

In other cases, the processing proceeds to step S244.

When it is determined that the correlation of the upward slopingdirection is highest in step S243 and the processing proceeds to stepS252, in step S252, the interpolation processing unit 104 executes theinterpolation processing using the reference pixels of the downwardsloping direction with respect to the selected interpolation objectpixels (PL pixels). The pixels that are selected as the reference pixelsare pixels that have the same colors as the selected interpolationobject pixels (PL pixels) and are at least the N pixels(non-polarization pixels) that are closest to the interpolation objectpixels (PL pixels).

Specifically, the interpolation processing unit 104 selects the two ormore pixels having the same color in the upper N pixel region and thelower N pixel region of the PL pixel region along the line of thedownward sloping direction of the selected interpolation object pixels(PL pixels) as the reference pixels and executes the linearinterpolation processing to which the pixel values of the referencepixels are applied.

In step S243, when it is determined that the correlation of the downwardsloping direction is not highest, the processing proceeds to step S244.In step S244, the interpolation processing unit 104 determines whetherthe vertical gradient coefficient: Vgrad is smallest and the correlationof the vertical direction is highest, on the basis of the comparison ofthe four gradient coefficients of the vertical gradient coefficient:Vgrad, the upward sloping gradient coefficient: Agrad, the downwardsloping gradient coefficient: Dgrad, and the horizontal gradientcoefficient: Hgrad.

In step S244, when it is determined that the correlation of the verticaldirection is highest, the processing proceeds to step S253.

In other cases, the processing proceeds to step S254.

When it is determined that the correlation of the vertical direction ishighest in step S244 and the processing proceeds to step S253, in stepS253, the interpolation processing unit 104 executes the interpolationprocessing using the reference pixels of the vertical direction withrespect to the selected interpolation object pixels (PL pixels). Thepixels that are selected as the reference pixels are pixels that havethe same colors as the selected interpolation object pixels (PL pixels)and are at least the N pixels (non-polarization pixels) that are closestto the interpolation object pixels (PL pixels).

Specifically, the interpolation processing unit 104 selects the two ormore pixels having the same color in the upper N pixel region and thelower N pixel region of the PL pixel region along the line of thevertical direction of the selected interpolation object pixels (PLpixels) as the reference pixels and executes the linear interpolationprocessing to which the pixel values of the reference pixels areapplied.

In step S244, when it is determined that the correlation of the verticaldirection is not highest, the processing proceeds to step S254. That is,this case is in which it is determined that the correction of thehorizontal direction is highest.

In step S254, the interpolation processing unit 104 executes theinterpolation processing using the reference pixels of the horizontaldirection with respect to the selected interpolation object pixels (PLpixels). The pixels that are selected as the reference pixels are the PLpixels that have the same colors as the selected interpolation objectpixels (PL pixels).

A specific example of the interpolation processing of the horizontaldirection will be described with reference to FIG. 27.

FIG. 27 illustrates an example of an expression to calculate aninterpolation pixel value: Lerp (x, y) of the PL pixel becoming theinterpolation object pixel by linear interpolation and a linear filterapplied to the linear interpolation.

The interpolation pixel value: Lerp (x, y) of the PL pixel (x, y) thatbecomes the interpolation object pixel is calculated by the followingexpression.Lerp(x,y)=((x+2,y)+2(x,y)+(x−2,y))/4

This expression is an expression to calculate the interpolation pixelvalue by adding the pixel value of the interpolation object pixel andthe pixel values of the pixels positioned at the left and right sides ofthe interpolation object pixel, closest to the interpolation objectpixel, and having the same color after setting the weight of 1:2:1.

As can be understood from the filter setting example of FIG. 27, whenthe interpolation processing of the G pixel of the vertical polarizationregion is executed, the pixel values of the G pixels of the left andright horizontal polarization regions are used as the pixel values ofthe reference pixels.

That is, in this processing example, when the interpolation of thehorizontal direction of the PL pixel is executed, the interpolationusing the right eye pixel as the reference pixel is executed in the caseof the interpolation of the left eye pixel and the interpolation usingthe left eye pixel as the reference pixel is executed in the case of theinterpolation of the right eye pixel.

The interpolation of the horizontal direction is executed when thereflection light is not included and the change rates of the pixelvalues of the horizontal direction are lower than the change rates ofthe pixel values of the other directions and when it is determined thatthe correction of the horizontal direction is high.

Because the reflection light is not included and it is determined thatthe difference of the pixel values between the pixels having thedifferent polarization directions is small, the possibility ofincorrectly setting the pixel values is low, even when the processing isexecuted using the pixels of the different polarization directions asthe reference pixels.

The interpolation processing example 1 with respect to the imagephotographed in the 3D image photographing mode has been described.

For a summary of the interpolation processing, the processing that isexecuted by the image correcting unit 100 illustrated in FIGS. 8 and 9can be summarized as follows.

-   (a) Correction of the brightness of the PL pixel and the pixel    adjacent to the PL pixel with the same brightness level as the N    pixel not adjacent to the PL pixel-   (b) Detection of the gradient information corresponding to each PL    pixel becoming the interpolation processing object-   (c) Detection of reflection information on whether reflection light    is included in each PL pixel becoming the interpolation processing    object-   (d) Output of the PL pixel in which the brightness correction and    the interpolation processing using the N pixels of the direction    having the high correlation to be selected from the three directions    of the vertical direction, the upward sloping direction, and the    downward sloping direction as the reference pixels are performed,    when the PL pixel becoming the interpolation processing object    includes the reflection light-   (e) Output of the PL pixel in which the brightness correction and    the interpolation processing using the N pixels of the direction    having the high correlation to be selected from the four directions    of the vertical direction, the upward sloping direction, the    downward sloping direction, and the horizontal direction as the    reference pixels are performed, when the PL pixel becoming the    interpolation processing object does not include the reflection    light

The image correcting unit 100 generates the interpolation image, thatis, the interpolation image (2D-Raw image) 62 illustrated in FIG. 8, bythe processing.

[2-(3). Interpolation Processing Example 2 with respect to ImagePhotographed in 3D Image Photographing Mode]

Next, the interpolation processing example 2 with respect to the imagephotographed in the 3D image photographing mode will be described.

The interpolation processing example to be described below is an exampleof interpolation processing that is executed in the image correctingunit 100 with respect to the image photographed in the 3D mode.

In this embodiment, the entire configuration of the imaging apparatus isthe same as the configuration illustrated in FIGS. 1A to 1C and theconfiguration of the image processing unit 17 is the same as theconfiguration illustrated in FIG. 8.

The configuration of the image correcting unit 100 of the imageprocessing unit 17 is the same as the configuration illustrated in FIG.9.

As illustrated in FIG. 9, the image correcting unit 100 includes abrightness correcting unit 101, a gradient detecting unit 102, areflection detecting unit 103, and an interpolation processing unit 104.

As described above, the image correcting unit 100 receives the totalpixel signal 81 from the polarization pixel separating unit 51illustrated in FIG. 8.

That is, the image correcting unit 100 receives the N pixel(non-polarization pixel) signal configured by the total transmissionpixels and the PL pixel (polarization pixel) signal.

In this embodiment, only the processing of the brightness correctingunit 100 of the image correcting unit 100 in 2-(2). InterpolationProcessing Example 1 with respect to Image Photographed in 3D ImagePhotographing Mode described above is changed. The other processing,that is, the processing of each of the gradient detecting unit 102, thereflection detecting unit 103, and the interpolation processing unit104, is the same processing as the processing already described in2-(2). Interpolation Processing Example 1 with respect to ImagePhotographed in 3D Image Photographing Mode.

FIG. 28 is a flowchart illustrating a sequence of processing that isexecuted by the image correcting unit 100 according to this embodiment.

In step S301, the image correcting unit 100 receives an image S (Rawimage) that is photographed in the 3D mode (setting of the firstpolarizing unit).

In step S302, the image correcting unit 100 generates a brightnesscorrection image T by the brightness correction processing of the PLpixel region and the PL pixel peripheral area.

In this processing example, the brightness correction processing becomesprocessing different from the processing already described in 2-(2).Interpolation Processing Example 1 with respect to Image Photographed in3D Image Photographing Mode.

The other processing, that is, the processing of steps S303 to S307,becomes the same processing as the processing of steps S203 to S207 ofthe flow illustrated in FIG. 23 that has already been described as theprocessing of 2-(2). Interpolation Processing Example 1 with respect toImage Photographed in 3D Image Photographing Mode.

The detailed configuration of the brightness correction processing ofstep S302 in this processing example will be described with reference toFIGS. 29 and 30.

A flowchart illustrated in FIG. 29 is a flowchart illustrating adetailed sequence of the brightness correction processing of step S302of the flow illustrated in FIG. 28.

The processing of each step will be described.

First, in step S321, the brightness correcting unit 101 of the imagecorrecting unit 100 illustrated in FIG. 9 selects one of the PL pixelsand the PL pixel adjacent pixels that become the brightness correctionobjects.

In this processing example, the brightness correction object pixels arethe PL pixels and the PL pixel adjacent pixels, similar to theprocessing example described above.

In step S322, the brightness correcting unit 101 selects the pixelshaving the same color and the same adjacent pixel setting condition asthe reference pixels from the peripheral region of the pixel (x, y)selected as the brightness correction object.

A specific example of the pixel selection will be described withreference to FIG. 30.

FIG. 30 illustrates an example of reference pixels 311 to 316 when a Gpixel 301 in the PL pixel region is selected as the brightnesscorrection object pixel.

The reference pixels 311 to 316 are pixels that have the same color andthe same adjacent pixel setting condition as the G pixel 301 selected asthe brightness correction object.

All of the reference pixels 311 to 316 are vertical polarization pixelsof the G pixels and are pixels in which setting of the eight peripheralpixels is the same.

These pixels are selected as the reference pixels.

Next, in step S323, gain (PGain) based on the difference (ratio) of thepixel values with the two upper and lower N pixels is calculated withrespect to each of the selected reference pixels. Processing forcalculating the gain (PGain) is the same processing as the processingfor calculating the gain already described with reference to FIG. 14(reference diagram).

In the processing that has already been described with reference to FIG.14, only the gain that corresponds to one interpolation object pixel iscalculated. However, in this processing example, seven gains (PGain)that correspond to a total of seven pixels including the interpolationobject pixel and the six reference pixels having the same conditionpositioned around the interpolation object pixel are calculated.

Next, in step S324, a center value (median value) is calculated from theseven gains (PGain) corresponding to the total of seven pixels includingthe interpolation object pixel and the six reference pixels having thesame condition positioned around the interpolation object pixel, whichare calculated in step S323.

The center value is used as adaptive gain (AGain).

Finally, in step S325, the pixel value [S (x, y)] of the correctionobject pixel is multiplied by the adaptive gain (PGain) and thebrightness correction pixel value is calculated.

This processing is executed with respect to all of the PL pixels and thePL pixel adjacent pixels, the brightness correction is performed, theobtained values are set as the pixel values of the PL pixels and the PLpixel adjacent pixels, and the brightness correction image T isgenerated.

In this processing example, when the brightness of the PL pixels and thePL pixel adjacent pixels is corrected, the gains according to the pixelvalue ratios (brightness ratios) of the reference pixels and theperipheral N pixels are calculated by referring to the correction objectpixel and the plurality of pixels having the same condition positionedaround the correction object pixel and the center value of the pluralityof gains is finally calculated as the gain applied to the brightnesscorrection of the interpolation pixel.

By this processing, even when an error is generated in the interpolationpixel or the N pixels around the interpolation pixel, the brightnesscorrection in which an influence of the error is decreased can beperformed.

[2-(4) Interpolation Processing Example 3 with Respect to ImagePhotographed in a 3D Image Photographing Mode]

Next, the interpolation processing example 3 with respect to the imagephotographed in the 3D image photographing mode will be described.

In the interpolation processing examples with respect to the imagephotographed in the 3D image photographing mode, that is, theinterpolation processing example 1 with respect to the imagephotographed in the 3D image photographing mode and the interpolationprocessing example 2 with respect to the image photographed in the 3Dimage photographing mode, the processing with respect to thephotographed image when the setting of the second polarizing unit 15 isthe region setting described with reference to FIG. 11 is executed.

That is, the PL pixel (polarization pixel) regions of the two rows inwhich the vertical polarization region 15V and the horizontalpolarization region 15H are set and are alternately arranged in units ofrectangular regions including the four pixels of 2×2 and the N pixel(non-polarization pixel) regions 15A, which are the total transmissionpixels of the fourteen rows, are repetitively arranged in the verticaldirection (Y direction).

The image processing apparatus according to the present disclosure canbe applied to the image to which the polarization region is set and animage to which another polarization region is set.

For example, a configuration illustrated in FIG. 31 may be used as thesetting of the polarization region.

That is, PL pixel (polarization pixel) regions of four rows in which thevertical polarization region 15V and the horizontal polarization region15H are set and are alternately arranged in unit of rectangular regionsincluding sixteen pixels of 4×4 and the N pixel (non-polarization pixel)regions 15A, which are the total transmission pixels of twenty eightrows, are repetitively arranged in the vertical direction (Y direction).

For example, the image correcting unit 100 illustrated in FIGS. 8 and 9can apply the same processing as the processing example described aboveto the photographed image having the polarization region of the abovesetting and execute the interpolation processing of the PL pixels.

Specifically, the following processing is executed.

-   (a) Correction of the brightness of the PL pixel and the pixel    adjacent to the PL pixel with the same brightness level as the N    pixel not adjacent to the PL pixel,-   (b) Detection of the gradient information corresponding to each PL    pixel becoming the interpolation processing object,-   (c) Detection of reflection information on whether reflection light    is included in each PL pixel becoming the interpolation processing    object,-   (d) Output of the PL pixel in which the brightness correction and    the interpolation processing using the N pixels of the direction    having the high correlation to be selected from the three directions    of the vertical direction, the upward sloping direction, and the    downward sloping direction as the reference pixels are performed    when the PL pixel becoming the interpolation processing object    includes the reflection light,-   (e) Output of the PL pixel in which the brightness correction and    the interpolation processing using the N pixels of the direction    having the high correlation to be selected from the four directions    of the vertical direction, the upward sloping direction, the    downward sloping direction, and the horizontal direction as the    reference pixels are performed when the PL pixel becoming the    interpolation processing object does not include the reflection    light.

The image correcting unit 100 generates the interpolation image, thatis, the interpolation image (2D-Raw image) 62 illustrated in FIG. 8, bythe processing.

However, as illustrated in FIG. 31, indexes (xindx (x), yindx (y)) todetermine attributes of the pixels are changed according to the settingchange of the polarization region.

FIG. 32 illustrates a setting example of the indexes showing the pixelattributes.

As illustrated in FIG. 32, kinds of the indexes showing the pixelattributes are as follows.

-   (1) X Coordinate Attribute (X index) [xidx (x)]-   (2) Y Coordinate Attribute (Y index) [yidx (y)]-   (3) Viewing Point Attribute (viewing point index) [ep (x, y)]-   (4) Color Attribute (color index) [color (x, y)]

A correspondence relation between a value of each attribute (index) andidentification information is as follows.

-   (1) X Coordinate Attribute (X index) [xidx (x)]-   xidx (x)=0, 1, 2, 3: left eye pixels or non-polarization (total    transmission) pixels of column including left eye pixels-   xidx (x)=4, 5, 6, 7: right eye pixels or non-polarization (total    transmission) pixels of column including right eye pixels-   (2) Y Coordinate Attribute (Y index) [yidx (y)]-   yindx (y)=0, 7: non-polarization (total transmission) pixels apart    from polarization pixel (PL pixel)-   yindx (y)=1, 6: non-polarization (total transmission) pixels apart    from polarization pixel (PL pixel)-   yindx (y)=2, 3, 4, 5: polarization pixels (PL pixels)-   (3) Viewing Point Attribute (viewing point index) [ep (x, y)]-   ex (x, y)=0: total transmission pixel (non-polarization pixel)-   ex (x, y)=−1: left eye pixel (vertical polarization pixel)-   ex (x, y)=+1: right eye pixel (horizontal polarization pixel)-   (4) Color Attribute (color index) [color (x, y)]-   Color (x, y)=0: red (R) pixel-   Color (x, y)=1: green (G) pixel-   Color (x, y)=2: blue (B) pixel

The image correcting unit 100 sets the index to correspond to the pixelof the input processing object image and executes processing based onthe index information.

The image correcting unit 100 determines the pixel attributes accordingto the indexes set according to the setting of the polarization region,executes each processing of (a) to (e) described above, and executes theinterpolation processing of the PL pixels and the PL pixel adjacentpixels. In this processing, basic processing is the same even when asetting aspect of the polarization region is changed in various forms.However, the pixel positions of the reference pixels or the filtersapplied in the filter processing should be changed appropriatelyaccording to the pixel arrangement.

In the interpolation processing that is executed by the interpolationprocessing unit 104 in the image correcting unit 100 illustrated in FIG.9, a direction of the reference pixels is selected according to thegradient information and presence or absence of the reflection light.

When there is reflection light, the direction having the highestcorrelation among the directions other than the horizontal direction,that is, applying the PL pixel as the reference pixel is selected as thereference pixel direction.

When there is no reflection light, the direction having the highestcorrelation among the directions including the horizontal direction isselected as the reference pixel direction.

In the embodiment described above, the four directions of the verticaldirection, the horizontal direction, the upward sloping direction, andthe downward sloping direction are set as the gradient detectiondirections.

However, only the vertical direction and the horizontal direction may beset as the gradient detection directions and the reference direction maybe selected from the two directions on the basis of the reflectioninformation and the gradient information.

[3. Summary of Configuration of Present Disclosure]

The configuration of the present disclosure has been described withreference to the specific embodiments. However, it will be apparent tothose skilled in the art that various modifications and substitutionscan be made without departing from the scope of the present disclosure.Therefore, it should be understood that the above embodiments are notlimitative in all aspects. The scope of the present disclosure isdefined by the appended claims.

Additionally, the present technology may also be configured as below.

-   (1) An image processing apparatus including:

a first polarizing unit that has a first polarization region and asecond polarization region to transmit different polarized lightcorresponding to different viewing point images;

a second polarizing unit that causes transmission light of the firstpolarizing unit to be incident and includes a third polarization regionto transmit only the transmission light of the first polarizationregion, a fourth polarization region to transmit only transmission lightof the second polarization region, and a total transmission region totransmit the transmission light of the first polarization region and thesecond polarization region;

an imaging element that receives the transmission light of the secondpolarizing unit; and

an image processing unit that executes signal processing with respect toan output signal of the imaging element,

wherein the image processing unit includes:

a parallax detecting unit that applies two different viewing pointimages of an image based on the transmission light of the thirdpolarization region of the second polarizing unit and an image based onthe transmission light of the fourth polarization region of the secondpolarizing unit and generates parallax information in which an objectdistance is reflected;

an image correcting unit that executes correction processing withrespect to an input image from the imaging element and generates atwo-dimensional image; and

a parallax image generating unit that applies the parallax informationgenerated by the parallax detecting unit, executes image conversionprocessing of the two-dimensional image generated by the imagecorrecting unit, and generates a left eye image and a right eye imagefor three-dimensional image display.

-   (2) The image processing apparatus according to (1),

wherein the image correcting unit includes:

a brightness correcting unit that executes brightness correction tomatch brightness of polarization region pixels (PL pixels) andpolarization region pixel adjacent pixels (PL pixel adjacent pixels),which are pixels corresponding to the third polarization region and thefourth polarization region of the second polarizing unit, withbrightness of total transmission region pixels (N pixels) correspondingto the total transmission region;

a reflection detecting unit that generates reflection information, whichis determination information on whether a reflection light component isincluded in each pixel value, in units of polarization region pixels (PLpixels);

a gradient detecting unit that generates gradient informationcorresponding to pixel value change rates of a plurality of directionsof peripheral pixels in units of polarization region pixels (PL pixels);and

an interpolation processing unit that selects reference pixels accordingto the reflection information and the gradient information, appliespixel values of the selected reference pixels, and executes pixel valueinterpolation processing of the polarization region pixels (PL pixels).

-   (3) The image processing apparatus according to (1) or (2),

wherein the interpolation processing unit determines a direction havinga high correlation in which a gradient is small on the basis of gradientinformation of non-polarization region pixels (N pixels) becominginterpolation processing objects, and executes interpolation processingusing pixels in the direction having the high correlation as thereference pixels.

-   (4) The image processing apparatus according to any one of (1) to    (3),

wherein the interpolation processing unit determines a direction havinga high correlation in which a gradient is small on the basis of gradientinformation of non-polarization region pixels (N pixels) becominginterpolation processing objects, and executes interpolation processingusing the non-polarization region pixels (N pixels) in the directionhaving the high correlation as the reference pixels.

-   (5) The image processing apparatus according to any one of (1) to    (4),

wherein, when reflection information of the polarization region pixels(PL pixels) becoming interpolation processing objects shows that thereis reflection, the interpolation processing unit selectsnon-polarization region pixels (N pixels) in a direction having a highcorrelation as the reference pixels on the basis of the gradientinformation, and executes interpolation processing to which the selectedreference pixels are applied.

-   (6) The image processing apparatus according to any one of (1) to    (5),

wherein, when reflection information of the polarization region pixels(PL pixels) becoming interpolation processing objects shows that thereis no reflection, the interpolation processing unit selectsnon-polarization region pixels (N pixels) in a direction having a highcorrelation or the polarization region pixels (PL pixels) as thereference pixels on the basis of the gradient information, and executesinterpolation processing to which the selected reference pixels areapplied.

-   (7) The image processing apparatus according to any one of (1) to    (6),

wherein, in interpolation processing with respect to a photographedimage of a 2D mode photographed in a state in which the first polarizingunit is removed from an optical path, the interpolation processing unitoutputs a pixel value in which the brightness is corrected by thebrightness correcting unit, without executing the interpolationprocessing of the polarization region pixels (PL pixels), whenreflection information of the polarization region pixels (PL pixels)becoming interpolation processing objects shows that there is noreflection.

-   (8) The image processing apparatus according to any one of (1) to    (7),

wherein the brightness correcting unit calculates gains corresponding tobrightness ratios with the total transmission region pixels (N pixels)around the polarization region pixels (PL pixels) or the polarizationregion pixel adjacent pixels (PL pixel adjacent pixels) becomingbrightness correction objects, multiplies the brightness correctionobject pixels with the calculated gains, and executes brightnesscorrection.

-   (9) The image processing apparatus according to any one of (1) to    (8),

wherein the reflection detecting unit detects a difference of a pixelvalue of an imaging element corresponding to a position of the thirdpolarization region of the second polarizing unit and a pixel value ofan imaging element corresponding to a position of the fourthpolarization region of the second polarizing unit and generatesreflection information, which is determination information on whether areflection light component is included in a pixel value of thepolarization region pixel (PL pixel), on the basis of the difference.

-   (10) The image processing apparatus according to any one of (1) to    (9),

wherein the image correcting unit sets an index showing a pixelattribute in units of pixels forming an output image from the imagingelement and determines processing according to the index.

-   (11) The image processing apparatus according to any one of (1) to    (10),

wherein the index includes a coordinate attribute showing a pixelposition, a viewing point attribute showing a viewing point position,and a color attribute showing a pixel color.

A method of the processing that is executed in the apparatus and aprogram for executing the processing are included in the configurationof the present disclosure.

The series of processes described in the present disclosure can beexecuted by hardware, software, or a combination of the hardware and thesoftware. When the series of processes is executed by the software, aprogram having a recorded processing sequence may be installed in amemory in a computer embedded in dedicated hardware and may be executedor may be installed in a general-purpose computer in which variousprocessing can be executed and may be executed. For example, the programmay be recorded previously in a recording medium. The program may beinstalled from the recording medium to the computer or the program maybe received through a network such as a local area network (LAN) and theInternet and may be installed in the recording medium such as anembedded hard disk.

The various processing described in the present disclosure may beexecuted temporally according to the order described or may be executedin parallel or individually according to the processing capability of anapparatus executing the processing or the necessity. In the presentdisclosure, a system has a logical set configuration of a plurality ofapparatuses and each apparatus may not be provided in the same casing.

As described above, according to one embodiment of the presentdisclosure, a configuration that executes interpolation processing of atwo-dimensional image used for generating an image to be applied tothree-dimensional image display is provided.

For example, an image processing apparatus according to the presentdisclosure includes a first polarizing unit that has a firstpolarization region and a second polarization region to transmitdifferent polarized light corresponding to different viewing pointimages, a second polarizing unit that includes a third polarizationregion to transmit only transmission light of the first polarizationregion, a fourth polarization region to transmit only transmission lightof the second polarization region, and a total transmission region totransmit the total transmission light of the first polarization regionand the second polarization region, an imaging element, and an imageprocessing unit that executes signal processing with respect to anoutput signal of the imaging element. In this configuration, the imageprocessing unit executes correction processing to which presence orabsence of reflection light or gradient information is applied, withrespect to an input image from the imaging element, and generates atwo-dimensional image. The image processing unit applies parallaxinformation generated on the basis of each transmission light of thethird polarization region and the fourth polarization region, executesimage conversion of the two-dimensional image, and generates a left eyeimage and a right eye image for three-dimensional image display.

By this configuration, a two-dimensional image that has a small errorcan be generated by interpolation processing based on the reflectionlight or the gradient information and a left eye image and a right eyeimage for high-definition three-dimensional image display can begenerated by 2D3D conversion processing based on the two-dimensionalimage having high quality.

The present disclosure contains subject matter related to that disclosedin Japanese Priority Patent Application JP 2011-152885 filed in theJapan Patent Office on Jul. 11, 2011, the entire content of which ishereby incorporated by reference.

What is claimed is:
 1. An image processing apparatus comprising: a firstpolarizing unit which includes a first polarization region and a secondpolarization region and configured to transmit different polarized lightcorresponding to different viewing point images; a second polarizingunit configured to cause transmission light of the first polarizing unitto be incident and includes a third polarization region to transmit onlythe transmission light of the first polarization region, a fourthpolarization region to transmit only transmission light of the secondpolarization region, and a total transmission region to transmit thetransmission light of the first polarization region and the secondpolarization region; an imaging element configured to receive thetransmission light of the second polarizing unit; and an imageprocessing unit configured to execute signal processing with respect toan output signal of the imaging element, wherein the image processingunit includes: a parallax detecting unit configured to apply twodifferent viewing point images of an image based on the transmissionlight of the third polarization region of the second polarizing unit andan image based on the transmission light of the fourth polarizationregion of the second polarizing unit and generate parallax informationin which an object distance is reflected; a reflection detecting unitconfigured to generate reflection information, which is determinationinformation on whether a reflection light component is included in eachpixel value, in units of polarization region pixels (PL pixels); aninterpolation processing unit configured to select reference pixelsaccording to the reflection information, apply pixel values of theselected reference pixels, and execute pixel value interpolationprocessing of the polarization region pixels (PL pixels); and a parallaximage generating unit configured to apply the parallax informationgenerated by the parallax detecting unit.
 2. The image processingapparatus according to claim 1, wherein the interpolation processingunit is further configured to determine a direction having a highcorrelation, and execute interpolation processing using pixels in thedirection having the high correlation as the reference pixels.
 3. Theimage processing apparatus according to claim 1, wherein theinterpolation processing unit is further configured to determine adirection having a high correlation, and execute interpolationprocessing using non-polarization region pixels (N pixels) in thedirection having the high correlation as the reference pixels.
 4. Theimage processing apparatus according to claim 1, wherein, in response toreflection information of the polarization region pixels (PL pixels)becoming interpolation processing objects shows that there isreflection, the interpolation processing unit is configured to selectnon-polarization region pixels (N pixels) in a direction having a highcorrelation as the reference pixels, and execute interpolationprocessing to which the selected reference pixels are applied.
 5. Theimage processing apparatus according to claim 1, wherein, in response toreflection information of the polarization region pixels (PL pixels)becoming interpolation processing objects shows that there is noreflection, the interpolation processing unit is configured to selectnon-polarization region pixels (N pixels) in a direction having a highcorrelation or the polarization region pixels (PL pixels) as thereference pixels, and execute interpolation processing to which theselected reference pixels are applied.
 6. The image processing apparatusaccording to claim 1, wherein the reflection detecting unit is furtherconfigured to detect a difference of a pixel value of an imaging elementcorresponding to a position of the third polarization region of thesecond polarizing unit and a pixel value of an imaging elementcorresponding to a position of the fourth polarization region of thesecond polarizing unit and generate reflection information, which isdetermination information on whether a reflection light component isincluded in a pixel value of the polarization region pixel (PL pixel),on the basis of the difference.
 7. An image processing method that isexecuted by an image processing apparatus, wherein the image processingapparatus includes: a first polarizing unit which includes a firstpolarization region and a second polarization region and configured totransmit different polarized light corresponding to different viewingpoint images; a second polarizing unit configured to cause transmissionlight of the first polarizing unit to be incident and includes a thirdpolarization region to transmit only the transmission light of the firstpolarization region, a fourth polarization region to transmit onlytransmission light of the second polarization region, and a totaltransmission region to transmit the transmission light of the firstpolarization region and the second polarization region; an imagingelement configured to receive the transmission light of the secondpolarizing unit; and an image processing unit configured to executesignal processing with respect to an output signal of the imagingelement, wherein the image processing method comprising: applying twodifferent viewing point images of an image based on the transmissionlight of the third polarization region of the second polarizing unit andan image based on the transmission light of the fourth polarizationregion of the second polarizing unit and generating parallax informationin which an object distance is reflected; generating reflectioninformation which is determination information on whether a reflectionlight component is included in each pixel value, in units ofpolarization region pixels (PL pixels); selecting reference pixelsaccording to the reflection information; applying pixels values of theselected reference pixels; executing pixel value interpolationprocessing of the polarization region pixels (PL pixels); and applyingthe generated parallax information.
 8. At least one non-transitorycomputer-readable storage medium having encoded thereon executableinstructions that, when executed by at least one processor, cause the atleast one processor to carry out steps of operating an image processingapparatus that includes: a first polarizing unit which includes a firstpolarization region and a second polarization region and configured totransmit different polarized light corresponding to different viewingpoint images; a second polarizing unit configured to cause transmissionlight of the first polarizing unit to be incident and includes a thirdpolarization region to transmit only the transmission light of the firstpolarization region, a fourth polarization region to transmit onlytransmission light of the second polarization region, and a totaltransmission region to transmit the transmission light of the firstpolarization region and the second polarization region; an imagingelement configured to receive the transmission light of the secondpolarizing unit; and an image processing unit configured to executesignal processing with respect to an output signal of the imagingelement, wherein the steps comprising: applying two different viewingpoint images of an image based on the transmission light of the thirdpolarization region of the second polarizing unit and an image based onthe transmission light of the fourth polarization region of the secondpolarizing unit and generating parallax information in which an objectdistance is reflected; generating reflection information, which isdetermination information on whether a reflection light component isincluded in each pixel value, in units of polarization region pixels (PLpixels); selecting reference pixels according to the reflectioninformation; applying pixel values of the selected reference pixels;executing pixel value interpolation processing of the polarizationregion pixels (PL pixels); and applying the generated parallaxinformation.